/* NexHub Support System - Modern Futuristic Design */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* NexHub Lilablau Farbpalette */
    --primary: #7C3AED;
    --primary-light: #A78BFA;
    --primary-dark: #5B21B6;
    --primary-gradient: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%);
    --accent: #EC4899;
    --accent-light: #F472B6;
    
    /* Status Farben - Modern */
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #8B5CF6;
    
    /* Neutrale Farben */
    --light: #F9FAFB;
    --light-hover: #F3F4F6;
    --dark: #1F2937;
    --dark-bg: #111827;
    --border: #E5E7EB;
    --text: #374151;
    --text-light: #6B7280;
    
    /* Schatten & Effekte */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.3);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variablen */
body.dark-mode {
    /* Dark Mode Farbpalette - Dunkelgrau-blau */
    --primary: #A78BFA;
    --primary-light: #C4B5FD;
    --primary-dark: #8B5CF6;
    --primary-gradient: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
    --accent: #F472B6;
    --accent-light: #FBCFE8;
    
    /* Status Farben - Dark Mode */
    --success: #34D399;
    --danger: #F87171;
    --warning: #FBBF24;
    --info: #A78BFA;
    
    /* Neutrale Farben - Dark Mode */
    --light: #0F172A;
    --light-hover: #1E293B;
    --dark: #F1F5F9;
    --dark-bg: #020617;
    --border: #334155;
    --text: #E2E8F0;
    --text-light: #94A3B8;
    --text-muted: #64748B;
    
    /* Schatten & Effekte - Dark Mode */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.5);
    
    /* Hintergrund */
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
}

body.dark-mode * {
    border-color: var(--border);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: linear-gradient(135deg, #F9FAFB 0%, #EDE9FE 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

body.dark-mode {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%) !important;
    background-attachment: fixed !important;
    color: #E2E8F0 !important;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header - Modern Glassmorphism */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
    box-shadow: var(--shadow);
    padding: 20px 0;
    margin-bottom: 40px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

header h1::before {
    content: "⬢";
    font-size: 32px;
    -webkit-text-fill-color: var(--primary);
}

header nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

header nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
}

header nav a:hover {
    background: var(--primary-light);
    color: white;
    transform: translateY(-2px);
}

/* Buttons - Modern Futuristic */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.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:active {
    transform: scale(0.95);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

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

.btn-secondary {
    background: rgba(107, 114, 128, 0.1);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--text-light);
    color: white;
    border-color: var(--text-light);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #D97706 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #DC2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

.btn-block {
    display: block;
    width: 100%;
    justify-content: center;
}

/* Forms - Modern Glassmorphism */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    color: var(--text);
    font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
    background: white;
}

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

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

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

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

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-info i {
    font-size: 18px;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* Badges - Modern Pills with Gradients */
.badge {
    display: inline-block;
    padding: 6px 14px;
    font-size: 11px;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.badge-open {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.badge-in_progress {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.badge-waiting {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.badge-closed {
    background: linear-gradient(135deg, #6B7280, #4B5563);
    color: white;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.badge-priority-low {
    background: linear-gradient(135deg, #06B6D4, #0891B2);
    color: white;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.badge-priority-normal {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    color: white;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.badge-priority-high {
    background: linear-gradient(135deg, #F97316, #EA580C);
    color: white;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.badge-priority-urgent {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
    }
}

/* Tables - Modern Glass Design */
.tickets-table,
.data-table,
.simple-table {
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(124, 58, 237, 0.1);
    border-collapse: separate;
    border-spacing: 0;
}

.tickets-table th,
.data-table th,
.simple-table th {
    background: linear-gradient(135deg, #7C3AED, #8B5CF6);
    color: white;
    padding: 16px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.tickets-table td,
.data-table td,
.simple-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(124, 58, 237, 0.08);
    transition: var(--transition);
}

.tickets-table td small a {
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    transition: var(--transition);
}

.tickets-table td small a:hover {
    color: var(--primary-dark);
    gap: 6px;
}

.tickets-table tr:hover,
.data-table tr:hover {
    background: rgba(124, 58, 237, 0.05);
    transform: scale(1.01);
}

.tickets-table tbody tr {
    transition: var(--transition);
    cursor: pointer;
}

.ticket-subject {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

/* Messages - Modern Cards */
.message {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 16px;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.message:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.message::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 16px 0 0 16px;
}

.message-customer {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(167, 139, 250, 0.05));
    border-color: rgba(139, 92, 246, 0.2);
}

.message-customer::before {
    background: linear-gradient(180deg, #8B5CF6, #7C3AED);
}

.message-staff {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(167, 243, 208, 0.05));
    border-color: rgba(16, 185, 129, 0.2);
}

.message-staff::before {
    background: linear-gradient(180deg, #10B981, #059669);
}

.message-internal {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.1), rgba(253, 186, 116, 0.05));
    border-color: rgba(251, 146, 60, 0.2);
}

.message-internal::before {
    background: linear-gradient(180deg, #FB923C, #F97316);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}

.message-header strong {
    font-weight: 700;
    color: var(--dark);
}

.message-time {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.message-body {
    line-height: 1.6;
    color: var(--text);
}

/* Dashboard - Modern Layout */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 80px);
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
}

.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 24px;
    box-shadow: var(--shadow);
    border-right: 1px solid rgba(124, 58, 237, 0.1);
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
    text-decoration: none;
    color: var(--text);
    border-radius: 12px;
    transition: var(--transition);
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.sidebar-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-gradient);
    transform: scaleY(0);
    transition: var(--transition);
}

.sidebar-nav a:hover::before,
.sidebar-nav a.active::before {
    transform: scaleY(1);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(139, 92, 246, 0.05));
    color: var(--primary);
}

.sidebar-nav a.active {
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.main-content {
    flex: 1;
    padding: 40px;
}

/* Stats Grid - Modern Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    padding: 28px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(124, 58, 237, 0.1);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 42px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-icon {
    font-size: 48px;
    color: var(--primary-light);
    opacity: 0.3;
    position: absolute;
    top: 20px;
    right: 20px;
}

/* Filters - Modern Glass Panel */
.filters-section {
    margin-bottom: 32px;
}

.filters-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(124, 58, 237, 0.1);
}

.filters-form input,
.filters-form select {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.filters-form input:focus,
.filters-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

/* Login Page - Futuristic */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #7C3AED 0%, #EC4899 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.3) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

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

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 48px;
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-header h1 {
    font-size: 32px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.login-footer {
    margin-top: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}

/* Modals - Modern Overlay */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: modalFadeIn 0.3s ease;
}

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

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 36px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(124, 58, 237, 0.2);
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Ticket Detail - Modern Grid Layout */
.ticket-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.ticket-messages-section,
.ticket-sidebar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    padding: 28px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(124, 58, 237, 0.1);
}

.sidebar-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 2px solid transparent;
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.1), transparent) bottom / 100% 2px no-repeat;
}

.sidebar-section:last-child {
    border-bottom: none;
    background: none;
}

.sidebar-section h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin-bottom: 16px;
}

.sidebar-section dl {
    margin: 0;
}

.sidebar-section dt {
    font-weight: 700;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.sidebar-section dd {
    margin-left: 0;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 600;
}

/* Activity Log - Timeline Design */
.activity-log {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.activity-log::-webkit-scrollbar {
    width: 6px;
}

.activity-log::-webkit-scrollbar-track {
    background: rgba(124, 58, 237, 0.05);
    border-radius: 3px;
}

.activity-log::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 3px;
}

.activity-item {
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(139, 92, 246, 0.02));
    border-left: 3px solid var(--primary);
    transition: var(--transition);
    position: relative;
}

.activity-item:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(139, 92, 246, 0.05));
    transform: translateX(4px);
}

/* Responsive */
/* Responsive Design - Mobile Optimization */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(124, 58, 237, 0.1);
    }
    
    .main-content {
        padding: 24px 16px;
    }
    
    .ticket-detail-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .filters-form {
        flex-direction: column;
        padding: 20px;
        gap: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .toast-notification {
        min-width: 280px;
        right: 16px;
        top: 16px;
    }
    
    header h1 {
        font-size: 20px;
    }
    
    .tickets-table th,
    .tickets-table td {
        padding: 12px 8px;
        font-size: 13px;
    }
    
    .modal-content {
        padding: 24px;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .header-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stat-value {
        font-size: 32px;
    }
    
    .login-box {
        padding: 32px 24px;
    }
}

/* Utilities */
.no-results {
    text-align: center;
    padding: 60px 40px;
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 2px dashed rgba(124, 58, 237, 0.2);
}

.no-results::before {
    content: '⬢';
    display: block;
    font-size: 48px;
    color: var(--primary-light);
    margin-bottom: 16px;
    opacity: 0.5;
}

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

.content-header h1,
.content-header h2 {
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

footer {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(249, 250, 251, 0.95));
    backdrop-filter: blur(20px);
    padding: 24px;
    text-align: center;
    border-top: 1px solid rgba(124, 58, 237, 0.1);
    margin-top: auto;
}

footer::before {
    content: '⬢ NexHub Support System';
    display: block;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    font-size: 14px;
}
    margin-top: 40px;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

/* Auto-Refresh Animations - NexHub Style */
.highlight-update {
    animation: highlight 2s ease-in-out;
}

@keyframes highlight {
    0%, 100% { 
        background-color: transparent; 
    }
    50% { 
        background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(167, 139, 250, 0.1));
        box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
    }
}

/* Toast Notifications - Modern Glassmorphic */
.toast-notification {
    position: fixed;
    top: 24px;
    right: 24px;
    min-width: 340px;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(124, 58, 237, 0.2);
    z-index: 10000;
    opacity: 0;
    transform: translateX(450px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-header {
    background: var(--primary-gradient);
    color: white;
    padding: 14px 18px;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.toast-header i {
    font-size: 20px;
    animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.toast-header strong {
    flex: 1;
    font-weight: 700;
    font-size: 14px;
}

.toast-header button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    width: 28px;
    height: 28px;
    line-height: 1;
    border-radius: 8px;
    transition: var(--transition);
}

.toast-header button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.toast-body {
    padding: 18px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

/* Messages Container - Modern Scroll */
.messages-container {
    max-height: 650px;
    overflow-y: auto;
    padding-right: 8px;
}

.messages-container::-webkit-scrollbar {
    width: 8px;
}

.messages-container::-webkit-scrollbar-track {
    background: rgba(124, 58, 237, 0.05);
    border-radius: 4px;
}

.messages-container::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #7C3AED, #6D28D9);
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Additional Modern Enhancements */

/* Loading State */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(124, 58, 237, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

/* Enhanced Select Dropdowns */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237C3AED' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Checkbox & Radio Modern Style */
input[type="checkbox"],
input[type="radio"] {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    position: relative;
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background: var(--primary-gradient);
    border-color: var(--primary);
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Info Banner */
.info-banner {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(167, 139, 250, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-left: 4px solid #8B5CF6;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-banner i {
    color: #8B5CF6;
    font-size: 20px;
}

/* Success/Warning/Error States */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(167, 243, 208, 0.05));
    border-left-color: #10B981;
    color: #065f46;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(253, 230, 138, 0.05));
    border-left-color: #F59E0B;
    color: #78350f;
}

.alert-danger,
.alert-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(254, 202, 202, 0.05));
    border-left-color: #EF4444;
    color: #7f1d1d;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}

.tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* Code Blocks */
code,
pre {
    font-family: 'Courier New', monospace;
    background: rgba(124, 58, 237, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

pre {
    padding: 16px;
    border-radius: 12px;
    overflow-x: auto;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

/* Smooth Transitions on Page Load */
body {
    animation: fadeIn 0.5s ease-in;
}

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

/* Print Styles */
@media print {
    .sidebar,
    .filters-form,
    .header-actions,
    .toast-notification,
    footer {
        display: none;
    }
    
    .main-content {
        padding: 0;
    }
    
    .dashboard-container {
        display: block;
    }
}

/* ============================================
   DARK MODE - Dunkelgrau-Blau Theme
   ============================================ */

/* Dark Mode Variables */
body.dark-mode {
    --primary: #8B5CF6;
    --primary-light: #A78BFA;
    --primary-dark: #7C3AED;
    --primary-gradient: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
    
    /* Dark Background Colors */
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    --bg-card: rgba(30, 41, 59, 0.8);
    
    /* Dark Text Colors */
    --text: #E2E8F0;
    --text-light: #94A3B8;
    --text-muted: #64748B;
    
    /* Dark Borders */
    --border: #334155;
    --border-light: #475569;
    
    /* Adjusted Shadows for Dark Mode */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.4);
}

/* Body & Background */
body.dark-mode {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: var(--text);
}

/* Header */
body.dark-mode header {
    background: rgba(30, 41, 59, 0.95);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

/* Cards & Panels */
body.dark-mode .stat-card,
body.dark-mode .ticket-messages-section,
body.dark-mode .ticket-sidebar,
body.dark-mode .filters-form,
body.dark-mode .modal-content,
body.dark-mode .login-box {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-color: rgba(139, 92, 246, 0.2);
}

/* Tables */
body.dark-mode .tickets-table,
body.dark-mode .data-table,
body.dark-mode .simple-table {
    background: var(--bg-card);
    border-color: rgba(139, 92, 246, 0.2);
}

body.dark-mode .tickets-table th,
body.dark-mode .data-table th,
body.dark-mode .simple-table th {
    background: linear-gradient(135deg, #6D28D9, #7C3AED);
}

body.dark-mode .tickets-table td,
body.dark-mode .data-table td,
body.dark-mode .simple-table td {
    border-bottom-color: rgba(139, 92, 246, 0.15);
    color: var(--text);
}

body.dark-mode .tickets-table tr:hover,
body.dark-mode .data-table tr:hover {
    background: rgba(139, 92, 246, 0.1);
}

/* Forms */
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: rgba(51, 65, 85, 0.6);
    border-color: var(--border);
    color: var(--text);
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: var(--text-muted);
}

body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
    background: rgba(51, 65, 85, 0.8);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2);
}

/* Buttons */
body.dark-mode .btn-secondary {
    background: rgba(71, 85, 105, 0.6);
    border-color: var(--border-light);
    color: var(--text);
}

body.dark-mode .btn-secondary:hover {
    background: rgba(71, 85, 105, 0.8);
}

/* Sidebar */
body.dark-mode .sidebar {
    background: rgba(30, 41, 59, 0.95);
    border-right-color: rgba(139, 92, 246, 0.2);
}

body.dark-mode .sidebar-nav a {
    color: var(--text-light);
}

body.dark-mode .sidebar-nav a:hover,
body.dark-mode .sidebar-nav a.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(167, 139, 250, 0.1));
    color: var(--primary-light);
}

/* Messages */
body.dark-mode .message-customer {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(167, 139, 250, 0.1));
    border-color: rgba(139, 92, 246, 0.3);
}

body.dark-mode .message-staff {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(167, 243, 208, 0.1));
    border-color: rgba(16, 185, 129, 0.3);
}

body.dark-mode .message-internal {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.2), rgba(253, 186, 116, 0.1));
    border-color: rgba(251, 146, 60, 0.3);
}

body.dark-mode .message-header {
    border-bottom-color: rgba(139, 92, 246, 0.2);
}

body.dark-mode .message-header strong {
    color: var(--text);
}

/* Alerts */
body.dark-mode .alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(167, 243, 208, 0.1));
    color: #A7F3D0;
}

body.dark-mode .alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(253, 230, 138, 0.1));
    color: #FDE68A;
}

body.dark-mode .alert-danger,
body.dark-mode .alert-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(254, 202, 202, 0.1));
    color: #FECACA;
}

/* Activity Log */
body.dark-mode .activity-item {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(167, 139, 250, 0.05));
    border-left-color: var(--primary-light);
}

/* Footer */
body.dark-mode footer {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border-top-color: rgba(139, 92, 246, 0.2);
}

/* Modals */
body.dark-mode .modal {
    background: rgba(0, 0, 0, 0.8);
}

/* Toast Notifications */
body.dark-mode .toast-notification {
    background: rgba(30, 41, 59, 0.98);
    border-color: rgba(139, 92, 246, 0.3);
}

body.dark-mode .toast-body {
    color: var(--text);
}

/* Dashboard Container */
body.dark-mode .dashboard-container {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
}

body.dark-mode .main-content {
    background: transparent;
}

/* Info Banner */
body.dark-mode .info-banner {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(167, 139, 250, 0.1));
    border-color: rgba(139, 92, 246, 0.4);
}

/* Login Page */
body.dark-mode .login-page {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
}

body.dark-mode .login-page::before {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
}

/* No Results */
body.dark-mode .no-results {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(139, 92, 246, 0.3);
    color: var(--text-light);
}

/* Scrollbars */
body.dark-mode ::-webkit-scrollbar-track {
    background: rgba(51, 65, 85, 0.3);
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8B5CF6, #7C3AED);
}

/* Code Blocks */
body.dark-mode code,
body.dark-mode pre {
    background: rgba(139, 92, 246, 0.15);
    color: var(--text);
}

body.dark-mode pre {
    border-color: rgba(139, 92, 246, 0.3);
}

/* Sidebar Sections */
body.dark-mode .sidebar-section {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.15), transparent) bottom / 100% 2px no-repeat;
}

body.dark-mode .sidebar-section h3 {
    color: var(--primary-light);
}

body.dark-mode .sidebar-section dt {
    color: var(--text-light);
}

body.dark-mode .sidebar-section dd {
    color: var(--text);
}

/* Content Header */
body.dark-mode .content-header h1,
body.dark-mode .content-header h2 {
    color: var(--text);
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-xl);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    transition: var(--transition);
    z-index: 1000;
}

.dark-mode-toggle:hover {
    transform: translateY(-4px) rotate(20deg);
    box-shadow: 0 25px 30px -10px rgba(124, 58, 237, 0.5);
}

.dark-mode-toggle:active {
    transform: translateY(-2px) rotate(20deg);
}

.dark-mode-toggle i {
    transition: transform 0.3s ease;
}

body.dark-mode .dark-mode-toggle {
    background: linear-gradient(135deg, #475569, #334155);
}

body.dark-mode .dark-mode-toggle:hover {
    box-shadow: 0 25px 30px -10px rgba(71, 85, 105, 0.5);
}

@media (max-width: 768px) {
    .dark-mode-toggle {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}

/* Dark Mode Toggle in Header */
/* Dark Mode Toggle Button - Einfach & Klar */
.dark-mode-toggle-header {
    background: rgba(124, 58, 237, 0.1) !important;
    border: 2px solid rgba(124, 58, 237, 0.3) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    color: #7C3AED !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.dark-mode-toggle-header:hover {
    background: rgba(124, 58, 237, 0.2) !important;
    border-color: #7C3AED !important;
    transform: translateY(-1px) !important;
}

.dark-mode-toggle-header:active {
    transform: translateY(0) !important;
}

body.dark-mode .dark-mode-toggle-header {
    background: rgba(167, 139, 250, 0.15) !important;
    border-color: rgba(167, 139, 250, 0.4) !important;
    color: #A78BFA !important;
}

body.dark-mode .dark-mode-toggle-header:hover {
    background: rgba(167, 139, 250, 0.25) !important;
    border-color: #A78BFA !important;
}

/* Floating Dark Mode Button */
.dark-mode-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
    z-index: 9999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(124, 58, 237, 0.6);
}

body.dark-mode .dark-mode-toggle {
    background: linear-gradient(135deg, #A78BFA 0%, #C4B5FD 100%);
}

/* Dark Mode - Spezifische Element Styles */
body.dark-mode .container {
    background: rgba(15, 23, 42, 0.6);
}

body.dark-mode header {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: rgba(139, 92, 246, 0.3);
}

body.dark-mode .card,
body.dark-mode .ticket-card,
body.dark-mode .form-group,
body.dark-mode .info-banner {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(139, 92, 246, 0.3);
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(139, 92, 246, 0.4);
    color: var(--text);
}

body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

body.dark-mode .btn-primary {
    background: var(--primary-gradient);
}

body.dark-mode table {
    background: rgba(30, 41, 59, 0.8);
}

body.dark-mode table thead {
    background: rgba(15, 23, 42, 0.9);
}

body.dark-mode table tbody tr {
    border-bottom-color: rgba(139, 92, 246, 0.2);
}

body.dark-mode table tbody tr:hover {
    background: rgba(139, 92, 246, 0.1);
}

body.dark-mode .sidebar {
    background: rgba(15, 23, 42, 0.95);
    border-right-color: rgba(139, 92, 246, 0.3);
}

body.dark-mode .sidebar a {
    color: var(--text-light);
}

body.dark-mode .sidebar a:hover,
body.dark-mode .sidebar a.active {
    background: rgba(139, 92, 246, 0.2);
    color: var(--primary-light);
}

body.dark-mode .message-staff {
    background: rgba(30, 41, 59, 0.9);
    border-left-color: var(--primary);
}

body.dark-mode .message-customer {
    background: rgba(139, 92, 246, 0.15);
    border-left-color: var(--primary-light);
}

body.dark-mode .badge {
    color: #1F2937;
}

body.dark-mode footer {
    background: rgba(15, 23, 42, 0.95);
    border-top-color: rgba(139, 92, 246, 0.3);
}

/* ========================================
   DARK MODE - Vollständige Styles
   ======================================== */

/* Container & Layout */
body.dark-mode .container {
    background: transparent;
}

/* Header */
body.dark-mode header {
    background: rgba(15, 23, 42, 0.95) !important;
    border-bottom-color: rgba(139, 92, 246, 0.3) !important;
}

body.dark-mode header h1 {
    color: #E2E8F0 !important;
}

body.dark-mode header nav a {
    color: #94A3B8 !important;
}

body.dark-mode header nav a:hover {
    background: rgba(139, 92, 246, 0.2) !important;
    color: #C4B5FD !important;
}

body.dark-mode header nav span {
    color: #94A3B8 !important;
}

/* Cards & Boxes */
body.dark-mode .card,
body.dark-mode .ticket-card,
body.dark-mode .ticket-form-wrapper,
body.dark-mode .info-banner {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
    color: #E2E8F0 !important;
}

body.dark-mode .card h1,
body.dark-mode .card h2,
body.dark-mode .card h3,
body.dark-mode .ticket-form-wrapper h1,
body.dark-mode .ticket-form-wrapper h2 {
    color: #E2E8F0 !important;
}

body.dark-mode .card p,
body.dark-mode .ticket-form-wrapper p {
    color: #94A3B8 !important;
}

/* Forms */
body.dark-mode .form-group label {
    color: #E2E8F0 !important;
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background: rgba(15, 23, 42, 0.9) !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
    color: #E2E8F0 !important;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #64748B !important;
}

body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
    border-color: #A78BFA !important;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2) !important;
}

/* Buttons */
body.dark-mode .btn-primary {
    background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%) !important;
    color: white !important;
}

body.dark-mode .btn-primary:hover {
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5) !important;
}

body.dark-mode .btn-secondary {
    background: rgba(51, 65, 85, 0.8) !important;
    color: #E2E8F0 !important;
}

/* Tables */
body.dark-mode table {
    background: rgba(30, 41, 59, 0.8) !important;
}

body.dark-mode table thead {
    background: rgba(15, 23, 42, 0.9) !important;
}

body.dark-mode table thead th {
    color: #E2E8F0 !important;
    border-bottom-color: rgba(139, 92, 246, 0.3) !important;
}

body.dark-mode table tbody tr {
    border-bottom-color: rgba(139, 92, 246, 0.2) !important;
}

body.dark-mode table tbody tr:hover {
    background: rgba(139, 92, 246, 0.1) !important;
}

body.dark-mode table tbody td {
    color: #E2E8F0 !important;
}

/* Sidebar */
body.dark-mode .sidebar {
    background: rgba(15, 23, 42, 0.95) !important;
    border-right-color: rgba(139, 92, 246, 0.3) !important;
}

body.dark-mode .sidebar h2,
body.dark-mode .sidebar h3 {
    color: #E2E8F0 !important;
}

body.dark-mode .sidebar a {
    color: #94A3B8 !important;
}

body.dark-mode .sidebar a:hover,
body.dark-mode .sidebar a.active {
    background: rgba(139, 92, 246, 0.2) !important;
    color: #C4B5FD !important;
}

/* Messages */
body.dark-mode .message-staff {
    background: rgba(30, 41, 59, 0.9) !important;
    border-left-color: #8B5CF6 !important;
}

body.dark-mode .message-customer {
    background: rgba(139, 92, 246, 0.15) !important;
    border-left-color: #A78BFA !important;
}

body.dark-mode .message-header strong {
    color: #E2E8F0 !important;
}

body.dark-mode .message-time {
    color: #64748B !important;
}

body.dark-mode .message-content {
    color: #E2E8F0 !important;
}

/* Badges */
body.dark-mode .badge {
    color: #1F2937 !important;
}

/* Stats */
body.dark-mode .stat-card {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
}

body.dark-mode .stat-card h3 {
    color: #E2E8F0 !important;
}

body.dark-mode .stat-card .stat-value {
    color: #A78BFA !important;
}

/* Footer */
body.dark-mode footer {
    background: rgba(15, 23, 42, 0.95) !important;
    border-top-color: rgba(139, 92, 246, 0.3) !important;
}

body.dark-mode footer p,
body.dark-mode footer a {
    color: #94A3B8 !important;
}

body.dark-mode footer a:hover {
    color: #C4B5FD !important;
}

/* Dashboard Container */
body.dark-mode .dashboard-container {
    background: transparent !important;
}

body.dark-mode .main-content {
    background: transparent !important;
}

body.dark-mode .content-header h1 {
    color: #E2E8F0 !important;
}

/* Alert Messages */
body.dark-mode .alert {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
    color: #E2E8F0 !important;
}

body.dark-mode .alert-success {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
}

body.dark-mode .alert-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
}

/* Info Banner */
body.dark-mode .info-banner {
    background: rgba(139, 92, 246, 0.15) !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
}

body.dark-mode .info-banner h2,
body.dark-mode .info-banner p {
    color: #E2E8F0 !important;
}

/* END DARK MODE */

/* ============================================================
   DARK MODE - FINALE VERSION (Muss ganz am Ende sein!)
   ============================================================ */

/* Body Dark Mode - HÖCHSTE PRIORITÄT */
html.dark-mode,
html.dark-mode body,
body.dark-mode {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%) !important;
    background-color: #0F172A !important;
    background-attachment: fixed !important;
    color: #E2E8F0 !important;
    min-height: 100vh !important;
}

/* Override ANY background */
body.dark-mode,
body.dark-mode * {
    --bg-light: #0F172A !important;
}

/* Button Toggle - MAXIMALE PRIORITÄT */
button.dark-mode-toggle-header,
.dark-mode-toggle-header {
    background: rgba(124, 58, 237, 0.15) !important;
    border: 2px solid rgba(124, 58, 237, 0.4) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    color: #7C3AED !important;
    cursor: pointer !important;
    font-size: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
}

button.dark-mode-toggle-header:hover,
.dark-mode-toggle-header:hover {
    background: rgba(124, 58, 237, 0.3) !important;
    border-color: #7C3AED !important;
    transform: translateY(-2px) !important;
}

body.dark-mode button.dark-mode-toggle-header,
body.dark-mode .dark-mode-toggle-header {
    background: rgba(167, 139, 250, 0.2) !important;
    border-color: rgba(167, 139, 250, 0.5) !important;
    color: #C4B5FD !important;
}

body.dark-mode button.dark-mode-toggle-header:hover,
body.dark-mode .dark-mode-toggle-header:hover {
    background: rgba(167, 139, 250, 0.3) !important;
    border-color: #C4B5FD !important;
}

/* ENDE DARK MODE */
