/* Custom Styles for Minecraft Dashboard - Modern Design */
:root {
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-danger: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    --gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.18);
}

body {
    /* Standard-Hintergrund - wird überschrieben wenn Hintergrundbild gesetzt ist */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    color: var(--bs-body-color);
    transition: background-color 0.3s ease, color 0.3s ease, background-image 0.3s ease;
    min-height: 100vh;
}

/* Hintergrundbild hat Priorität */
body[style*="background-image"] {
    background: var(--background-image-url) !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
}

.item-icon {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.item-icon:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.card {
    border-radius: 20px;
    border: none;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    background: var(--glass-bg);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px 20px 0 0 !important;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.table-hover tbody tr {
    transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
    background: rgba(102, 126, 234, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Mobile-Optimierungen */
@media (max-width: 991.98px) {
    .navbar-brand {
        font-size: 1rem;
        padding: 0.5rem 0;
    }
    
    .navbar-nav {
        padding-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .navbar-nav .dropdown-menu {
        border: none;
        box-shadow: none;
        background: transparent;
        padding-left: 1.5rem;
    }
    
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 0.5rem 0.25rem;
    }
    
    #userNav {
        flex-shrink: 0;
    }
    
    #userNav .dropdown-toggle {
        padding: 0.25rem !important;
    }
    
    #userNav .dropdown-toggle img {
        width: 28px !important;
        height: 28px !important;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 0.25rem;
    }
}

/* Tablet-Optimierungen */
@media (min-width: 768px) and (max-width: 991.98px) {
    .navbar-nav .nav-link span {
        display: inline;
    }
}

/* Desktop-Optimierungen */
@media (min-width: 992px) {
    .navbar-collapse {
        flex-grow: 1;
    }
    
    .navbar-nav {
        flex-wrap: nowrap;
    }
}

/* Darkmode Support für gesamte Seite */
[data-bs-theme="dark"] {
    color-scheme: dark;
    --glass-bg: rgba(30, 30, 30, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-attachment: fixed;
    color: var(--bs-light);
}

[data-bs-theme="dark"] .table-light {
    --bs-table-bg: var(--bs-dark);
    --bs-table-color: var(--bs-light);
    background-color: var(--bs-dark);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .table-secondary {
    --bs-table-bg: rgba(108, 117, 125, 0.2);
    --bs-table-color: var(--bs-light);
}

[data-bs-theme="dark"] .card {
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--bs-light);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .card-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .navbar {
    background: rgba(20, 20, 30, 0.9) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .modal-content {
    background-color: var(--bs-dark);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .modal-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: var(--bs-dark);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: var(--bs-dark);
    border-color: var(--bs-primary);
    color: var(--bs-light);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

[data-bs-theme="dark"] .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

[data-bs-theme="dark"] .btn-outline-primary,
[data-bs-theme="dark"] .btn-outline-danger,
[data-bs-theme="dark"] .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.3);
}

[data-bs-theme="dark"] .btn-outline-primary:hover,
[data-bs-theme="dark"] .btn-outline-danger:hover,
[data-bs-theme="dark"] .btn-outline-secondary:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

[data-bs-theme="dark"] .alert {
    border-color: rgba(255, 255, 255, 0.1);
    background-color: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
}

/* Alert-Farben im Dark Mode - Maximale Lesbarkeit */
[data-bs-theme="dark"] .alert-info {
    background: rgba(30, 58, 138, 0.4) !important;
    color: #dbeafe !important;
    border-color: rgba(59, 130, 246, 0.6) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

[data-bs-theme="dark"] .alert-info * {
    color: #dbeafe !important;
}

[data-bs-theme="dark"] .alert-info .bi {
    color: #93c5fd !important;
}

[data-bs-theme="dark"] .alert-success {
    background: rgba(20, 83, 45, 0.4) !important;
    color: #d1fae5 !important;
    border-color: rgba(34, 197, 94, 0.6) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

[data-bs-theme="dark"] .alert-success * {
    color: #d1fae5 !important;
}

[data-bs-theme="dark"] .alert-success .bi {
    color: #6ee7b7 !important;
}

[data-bs-theme="dark"] .alert-warning {
    background: rgba(120, 53, 15, 0.4) !important;
    color: #fef3c7 !important;
    border-color: rgba(251, 191, 36, 0.6) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
}

[data-bs-theme="dark"] .alert-warning * {
    color: #fef3c7 !important;
}

[data-bs-theme="dark"] .alert-warning .bi {
    color: #fde68a !important;
}

[data-bs-theme="dark"] .alert-danger {
    background: rgba(127, 29, 29, 0.4) !important;
    color: #fee2e2 !important;
    border-color: rgba(239, 68, 68, 0.6) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

[data-bs-theme="dark"] .alert-danger * {
    color: #fee2e2 !important;
}

[data-bs-theme="dark"] .alert-danger .bi {
    color: #fca5a5 !important;
}

/* Alert-Text generell im Dark Mode lesbarer */
[data-bs-theme="dark"] .alert {
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .alert strong {
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .alert p,
[data-bs-theme="dark"] .alert div,
[data-bs-theme="dark"] .alert span {
    color: inherit !important;
}

[data-bs-theme="dark"] .navbar {
    background-color: rgba(20, 20, 30, 0.95) !important;
    border-bottom-color: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(20px);
}

[data-bs-theme="dark"] .navbar-brand {
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 500;
}

[data-bs-theme="dark"] .nav-link:hover {
    background: rgba(102, 126, 234, 0.25) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

[data-bs-theme="dark"] .nav-link.active {
    background: var(--gradient-primary) !important;
    color: #ffffff !important;
    box-shadow: var(--shadow-md);
    z-index: 10;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .nav-link.active:hover {
    background: var(--gradient-primary) !important;
    color: #ffffff !important;
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

[data-bs-theme="dark"] .nav-link.dropdown-toggle {
    color: rgba(255, 255, 255, 0.95) !important;
}

[data-bs-theme="dark"] .nav-link.dropdown-toggle:hover {
    background: rgba(102, 126, 234, 0.25) !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .nav-link.dropdown-toggle.active {
    background: var(--gradient-primary) !important;
    color: #ffffff !important;
}

/* Toast-Notifications Darkmode */
[data-bs-theme="dark"] .toast-container {
    z-index: 9999;
}

[data-bs-theme="dark"] .toast {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
}

/* Pagination Darkmode */
[data-bs-theme="dark"] .pagination .page-link {
    background-color: var(--bs-dark);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .pagination .page-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .pagination .page-item.active .page-link {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .pagination .page-item.disabled .page-link {
    background-color: var(--bs-dark);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* Form-Controls Darkmode (alle) - Pfeile entfernen */
[data-bs-theme="dark"] .form-select {
    background-image: none !important;
    padding-right: 1rem;
}

/* Code-Elemente Darkmode */
[data-bs-theme="dark"] code {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--bs-light);
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
}

/* Badge Darkmode */
[data-bs-theme="dark"] .badge {
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

/* Links im Dark Mode */
[data-bs-theme="dark"] a {
    color: rgba(102, 126, 234, 0.9);
}

[data-bs-theme="dark"] a:hover {
    color: #a5b4fc;
}

[data-bs-theme="dark"] a:focus {
    color: #c7d2fe;
    outline: 2px solid rgba(102, 126, 255, 0.5);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Text-Bright: Im Light Mode dunkel, im Dark Mode hell */
.text-bright {
    color: var(--bs-dark);
}

[data-bs-theme="dark"] .text-bright {
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Text-Dark im Dark Mode überschreiben */
[data-bs-theme="dark"] .text-dark {
    color: #ffffff !important;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Text-Light-Dark Klasse für explizites helles Text im Dark Mode (Alias) */
[data-bs-theme="dark"] .text-light-dark {
    color: #ffffff !important;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Alert-Links im Dark Mode - Maximale Sichtbarkeit */
[data-bs-theme="dark"] .alert-link {
    color: #c7d2fe !important;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: rgba(199, 210, 254, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .alert-link:hover {
    color: #e0e7ff !important;
    text-decoration-color: #e0e7ff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .alert-info .alert-link {
    color: #bfdbfe !important;
    text-decoration-color: rgba(191, 219, 254, 0.8);
}

[data-bs-theme="dark"] .alert-warning .alert-link {
    color: #fef08a !important;
    text-decoration-color: rgba(254, 240, 138, 0.8);
}

[data-bs-theme="dark"] .alert-success .alert-link {
    color: #a7f3d0 !important;
    text-decoration-color: rgba(167, 243, 208, 0.8);
}

[data-bs-theme="dark"] .alert-danger .alert-link {
    color: #fecaca !important;
    text-decoration-color: rgba(254, 202, 202, 0.8);
}

/* Small-Text im Dark Mode */
[data-bs-theme="dark"] small,
[data-bs-theme="dark"] .small {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* List-Groups im Dark Mode */
[data-bs-theme="dark"] .list-group-item {
    background-color: rgba(30, 30, 30, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .list-group-item.active {
    background: var(--gradient-primary);
    border-color: rgba(102, 126, 234, 0.5);
    color: #ffffff;
}

/* Progress Bars im Dark Mode */
[data-bs-theme="dark"] .progress {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .progress-bar {
    background-color: var(--bs-primary);
    color: #ffffff;
    font-weight: 500;
}

[data-bs-theme="dark"] .progress-bar.bg-success {
    background-color: var(--bs-success) !important;
}

[data-bs-theme="dark"] .progress-bar.bg-warning {
    background-color: var(--bs-warning) !important;
    color: #000000;
}

[data-bs-theme="dark"] .progress-bar.bg-danger {
    background-color: var(--bs-danger) !important;
}

[data-bs-theme="dark"] .progress-bar.bg-info {
    background-color: var(--bs-info) !important;
}

/* Tabellen im Dark Mode - zusätzliche Verbesserungen */
[data-bs-theme="dark"] .table {
    color: var(--bs-light);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .table thead th {
    background-color: rgba(40, 40, 50, 0.8);
    color: rgba(255, 255, 255, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

[data-bs-theme="dark"] .table tbody td {
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

[data-bs-theme="dark"] .table tbody tr {
    border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.03);
}

[data-bs-theme="dark"] .table-bordered {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .table-bordered th,
[data-bs-theme="dark"] .table-bordered td {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Input-Groups im Dark Mode */
[data-bs-theme="dark"] .input-group-text {
    background-color: rgba(40, 40, 50, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

/* Breadcrumbs im Dark Mode */
[data-bs-theme="dark"] .breadcrumb {
    background-color: rgba(30, 30, 30, 0.8);
    border-radius: 8px;
}

[data-bs-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

[data-bs-theme="dark"] .breadcrumb-item a {
    color: rgba(102, 126, 234, 0.9);
}

[data-bs-theme="dark"] .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.7);
}

/* Accordion im Dark Mode */
[data-bs-theme="dark"] .accordion-item {
    background-color: rgba(30, 30, 30, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .accordion-button {
    background-color: rgba(40, 40, 50, 0.8);
    color: rgba(255, 255, 255, 0.95);
}

[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
    background-color: rgba(102, 126, 234, 0.2);
    color: #ffffff;
}

[data-bs-theme="dark"] .accordion-button::after {
    filter: invert(1) brightness(0.9);
}

[data-bs-theme="dark"] .accordion-body {
    background-color: rgba(30, 30, 30, 0.8);
    color: rgba(255, 255, 255, 0.9);
}

/* Spinner/Loading im Dark Mode */
[data-bs-theme="dark"] .spinner-border,
[data-bs-theme="dark"] .spinner-grow {
    border-color: rgba(102, 126, 234, 0.3);
    border-right-color: rgba(102, 126, 234, 1);
}

/* Popovers im Dark Mode */
[data-bs-theme="dark"] .popover {
    background-color: rgba(30, 30, 40, 0.98);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

[data-bs-theme="dark"] .popover-header {
    background-color: rgba(40, 40, 50, 0.8);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
}

[data-bs-theme="dark"] .popover-body {
    color: rgba(255, 255, 255, 0.9);
}

/* Tooltips im Dark Mode */
[data-bs-theme="dark"] .tooltip .tooltip-inner {
    background-color: rgba(40, 40, 50, 0.95);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .tooltip .tooltip-arrow::before {
    border-top-color: rgba(40, 40, 50, 0.95);
}

/* Mark/Highlight im Dark Mode */
[data-bs-theme="dark"] mark {
    background-color: rgba(255, 193, 7, 0.3);
    color: #fde047;
    padding: 0.1em 0.2em;
}

/* Kbd (Keyboard) im Dark Mode */
[data-bs-theme="dark"] kbd {
    background-color: rgba(40, 40, 50, 0.9);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Blockquote im Dark Mode */
[data-bs-theme="dark"] blockquote {
    border-left-color: rgba(102, 126, 234, 0.5);
    color: rgba(255, 255, 255, 0.8);
}

/* Card Footer im Dark Mode */
[data-bs-theme="dark"] .card-footer {
    background-color: rgba(40, 40, 50, 0.6);
    border-top-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

/* Form-Labels im Dark Mode */
[data-bs-theme="dark"] label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

[data-bs-theme="dark"] .form-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Form-Text (Hilfetext) im Dark Mode */
[data-bs-theme="dark"] .form-text {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Form-Check im Dark Mode */
[data-bs-theme="dark"] .form-check-input {
    background-color: rgba(40, 40, 50, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

[data-bs-theme="dark"] .form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

[data-bs-theme="dark"] .form-check-input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

[data-bs-theme="dark"] .form-check-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Form-Range im Dark Mode */
[data-bs-theme="dark"] .form-range::-webkit-slider-thumb {
    background-color: var(--bs-primary);
}

[data-bs-theme="dark"] .form-range::-moz-range-thumb {
    background-color: var(--bs-primary);
}

/* Form-Switch im Dark Mode */
[data-bs-theme="dark"] .form-switch .form-check-input {
    background-color: rgba(40, 40, 50, 0.9);
}

[data-bs-theme="dark"] .form-switch .form-check-input:checked {
    background-color: var(--bs-success);
    border-color: var(--bs-success);
}

/* Form-Control Focus verbessert */
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: rgba(40, 40, 50, 0.9) !important;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25) !important;
}

/* Modern Button Styles */
.btn {
    border-radius: 12px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    border: none;
    position: relative;
    overflow: hidden;
}

/* Fix modal z-index stacking for shop */
/* Modal z-index is now centralized in modal-defaults.css */
/* Do not override these values locally - use modal-defaults.css instead */

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

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

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

.btn-outline-primary:hover,
.btn-outline-success:hover,
.btn-outline-danger:hover,
.btn-outline-warning:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Active Buttons - Bessere Lesbarkeit */
.btn-primary.active,
.btn-primary:active,
.btn-success.active,
.btn-success:active,
.btn-danger.active,
.btn-danger:active,
.btn-warning.active,
.btn-warning:active {
    color: white !important;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.btn-outline-primary.active,
.btn-outline-primary:active,
.btn-outline-success.active,
.btn-outline-success:active,
.btn-outline-danger.active,
.btn-outline-danger:active,
.btn-outline-warning.active,
.btn-outline-warning:active {
    background: var(--gradient-primary);
    border-color: var(--bs-primary);
    color: white !important;
    font-weight: 600;
}

/* Dark Mode für aktive Buttons */
[data-bs-theme="dark"] .btn-primary.active,
[data-bs-theme="dark"] .btn-primary:active,
[data-bs-theme="dark"] .btn-success.active,
[data-bs-theme="dark"] .btn-success:active,
[data-bs-theme="dark"] .btn-danger.active,
[data-bs-theme="dark"] .btn-danger:active,
[data-bs-theme="dark"] .btn-warning.active,
[data-bs-theme="dark"] .btn-warning:active {
    color: white !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .btn-outline-primary.active,
[data-bs-theme="dark"] .btn-outline-primary:active,
[data-bs-theme="dark"] .btn-outline-success.active,
[data-bs-theme="dark"] .btn-outline-success:active,
[data-bs-theme="dark"] .btn-outline-danger.active,
[data-bs-theme="dark"] .btn-outline-danger:active,
[data-bs-theme="dark"] .btn-outline-warning.active,
[data-bs-theme="dark"] .btn-outline-warning:active {
    background: var(--gradient-primary) !important;
    border-color: var(--bs-primary) !important;
    color: white !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Navbar Modern Design */
.navbar {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1000;
}

.nav-link {
    border-radius: 10px;
    padding: 0.5rem 0.75rem !important;
    transition: all 0.2s ease;
    margin: 0 0.15rem;
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
}

.nav-link:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    z-index: 2;
}

.nav-link.active {
    background: var(--gradient-primary) !important;
    color: white !important;
    box-shadow: var(--shadow-md);
    z-index: 10;
    font-weight: 600;
}

.nav-link.active:hover {
    background: var(--gradient-primary) !important;
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* Badge Modern Design */
.badge {
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.badge:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* Chat-Styles */
.chat-messages {
    scroll-behavior: smooth;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.chat-message {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.chat-message:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.chat-message.new-message {
    animation: newMessagePulse 0.6s ease-out;
    background: rgba(102, 126, 234, 0.1) !important;
}

@keyframes newMessagePulse {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
        background: rgba(102, 126, 234, 0.2);
    }
    50% {
        background: rgba(102, 126, 234, 0.15);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        background: rgba(255, 255, 255, 0.6);
    }
}

#scrollToBottom {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

#chatStatus .spinner-border {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

.chat-message-text {
    word-wrap: break-word;
    white-space: pre-wrap;
}

[data-bs-theme="dark"] .chat-messages {
    background-color: var(--bs-dark) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Profil-Styles */
.profile-avatar {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    border: 4px solid rgba(255, 255, 255, 0.8);
}

.profile-avatar:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-lg);
}

/* Modal Modern Design */
.modal-content {
    border-radius: 24px;
    border: none;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 24px 24px 0 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

/* Form Controls Modern Design */
.form-control,
.form-select {
    border-radius: 12px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

/* Dropdown-Pfeile für form-select entfernen */
.form-select {
    background-image: none !important;
    padding-right: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.95);
}

/* Alert Modern Design */
.alert {
    border-radius: 16px;
    border: none;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    padding: 1.25rem 1.5rem;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-info {
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.2) 0%, rgba(13, 202, 240, 0.1) 100%);
    color: #0a58ca;
}

.alert-success {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.2) 0%, rgba(25, 135, 84, 0.1) 100%);
    color: #0f5132;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(255, 193, 7, 0.1) 100%);
    color: #664d03;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.2) 0%, rgba(220, 53, 69, 0.1) 100%);
    color: #842029;
}

/* Dropdown Modern Design */
.dropdown-menu {
    border-radius: 16px;
    border: none;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem;
    margin-top: 0.5rem;
    z-index: 1040; /* below modal backdrop (1050) and modals (1055) */
    min-width: 200px;
}

[data-bs-theme="dark"] .dropdown-menu {
    background: rgba(30, 30, 40, 0.98) !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.dropdown-header {
    padding: 0.75rem 1rem;
    margin-bottom: 0;
    font-size: 0.875rem;
    color: var(--bs-body-color);
    font-weight: 600;
}

[data-bs-theme="dark"] .dropdown-header {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 700;
}

.dropdown-item {
    border-radius: 10px;
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
    margin: 0.15rem 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-bs-theme="dark"] .dropdown-item {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 500;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(4px);
    z-index: 1;
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background: rgba(102, 126, 234, 0.3) !important;
    color: #ffffff !important;
    transform: translateX(4px);
}

.dropdown-item.active {
    background: var(--gradient-primary) !important;
    color: white !important;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

[data-bs-theme="dark"] .dropdown-item.active {
    background: var(--gradient-primary) !important;
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .dropdown-item.active i {
    color: #ffffff !important;
}

.dropdown-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545 !important;
}

[data-bs-theme="dark"] .dropdown-item.text-danger {
    color: rgba(255, 100, 100, 0.9) !important;
}

[data-bs-theme="dark"] .dropdown-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.3) !important;
    color: #ff6b6b !important;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

[data-bs-theme="dark"] .dropdown-item i {
    color: rgba(255, 255, 255, 0.9);
}

[data-bs-theme="dark"] .dropdown-divider {
    border-top-color: rgba(255, 255, 255, 0.15) !important;
    opacity: 1;
}

/* User-Dropdown Modern Design */
#userDropdown {
    border: none;
    background: transparent;
    color: var(--bs-body-color);
    transition: all 0.2s ease;
}

[data-bs-theme="dark"] #userDropdown {
    color: #ffffff !important;
}

[data-bs-theme="dark"] #userDropdown span.text-bright {
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] #userDropdown span.text-dark {
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] #userDropdown span.text-light-dark {
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Badge im User-Dropdown Button im Dark Mode */
[data-bs-theme="dark"] #userDropdown .badge {
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

[data-bs-theme="dark"] #userDropdown .badge.bg-danger {
    background-color: rgba(239, 68, 68, 0.9) !important;
    border-color: rgba(239, 68, 68, 1) !important;
}

[data-bs-theme="dark"] #userDropdown .badge.bg-warning {
    background-color: rgba(251, 191, 36, 0.9) !important;
    border-color: rgba(251, 191, 36, 1) !important;
    color: #000000 !important;
}

[data-bs-theme="dark"] #userDropdown .badge.bg-secondary {
    background-color: rgba(107, 114, 128, 0.9) !important;
    border-color: rgba(107, 114, 128, 1) !important;
    color: #ffffff !important;
}

/* Badge bg-secondary generell im Dark Mode besser lesbar */
[data-bs-theme="dark"] .badge.bg-secondary {
    background-color: rgba(107, 114, 128, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    font-weight: 600;
}

#userDropdown:hover {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
}

[data-bs-theme="dark"] #userDropdown:hover {
    background: rgba(102, 126, 234, 0.35) !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] #userDropdown:hover span {
    color: #ffffff !important;
}

#userDropdown:focus {
    box-shadow: none;
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

#userDropdown .dropdown-toggle::after {
    margin-left: 0.5rem;
}

[data-bs-theme="dark"] #userDropdown .dropdown-toggle::after {
    border-top-color: rgba(255, 255, 255, 0.9) !important;
}

[data-bs-theme="dark"] .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

[data-bs-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Responsive Verbesserungen */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .pagination .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .chat-messages {
        height: 300px !important;
    }
}

/* Navigation kompakter für bessere Bildschirmnutzung */
@media (min-width: 992px) {
    .navbar-nav {
        flex-wrap: nowrap;
    }
    
    .nav-link {
        padding: 0.5rem 0.6rem !important;
        font-size: 0.85rem;
    }
    
    .nav-link .d-none.d-lg-inline {
        margin-left: 0.25rem;
    }
}

@media (min-width: 1200px) {
    .nav-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.9rem;
    }
}
