/**
 * Support AI — Modern Design System
 * Professionelles SaaS-Dashboard-Design inspiriert von Linear, Vercel, Stripe
 */

/* ============================================================
   Custom Properties — Light Mode (Standard)
   ============================================================ */
:root {
    /* Colors */
    --primary-dark: #030712;
    --primary: #111827;
    --primary-light: #1f2937;

    /* Akzentfarbe Orange */
    --accent: #f97316;
    --accent-hover: #ea580c;
    --accent-soft: #fff7ed;
    --accent-border: #fdba74;
    --accent-glow: rgba(249, 115, 22, 0.15);
    --accent-gradient: linear-gradient(135deg, #f97316 0%, #fb923c 50%, #f59e0b 100%);

    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;

    /* Sidebar */
    --sidebar-bg: linear-gradient(180deg, #0c0f14 0%, #111827 40%, #1a1c2e 100%);
    --sidebar-border: rgba(249, 115, 22, 0.1);

    /* Scrollbar */
    --scrollbar-track: #f3f4f6;
    --scrollbar-thumb: #d1d5db;
    --scrollbar-thumb-hover: #9ca3af;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 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-accent: 0 4px 14px -2px rgba(249, 115, 22, 0.25);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   Dark Mode Variables — Belegbox/Maxento Style
   ============================================================ */
[data-theme="dark"] {
    --primary-dark: #060810;
    --primary: #0a0e1a;
    --primary-light: #0f1525;

    --accent: #f97316;
    --accent-hover: #fb923c;
    --accent-soft: rgba(249, 115, 22, 0.08);
    --accent-border: rgba(249, 115, 22, 0.2);
    --accent-glow: rgba(249, 115, 22, 0.15);

    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.03);
    --text-primary: #e8ecf4;
    --text-secondary: #8892a4;
    --text-muted: #565f70;
    --bg-page: #080b12;
    --bg-card: rgba(255, 255, 255, 0.03);

    --sidebar-bg: linear-gradient(180deg, #060810 0%, #0a0e1a 50%, #0d1220 100%);
    --sidebar-border: rgba(249, 115, 22, 0.12);

    --scrollbar-track: #0a0e1a;
    --scrollbar-thumb: rgba(255, 255, 255, 0.08);
    --scrollbar-thumb-hover: rgba(255, 255, 255, 0.15);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.7);
    --shadow-accent: 0 4px 20px rgba(249, 115, 22, 0.2);
}

/* Dark mode: Glassmorphism Cards */
[data-theme="dark"] .stat-card,
[data-theme="dark"] .card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] .stat-card:not(.accent):not(.card-blue):not(.card-yellow):not(.card-orange):not(.card-green):not(.card-purple):hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

/* ---- Dark Mode: Stat-Cards dunkel mit Farbakzent ---- */
[data-theme="dark"] .card-blue {
    background: linear-gradient(135deg, #0c1929 0%, #132744 100%) !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
}
[data-theme="dark"] .card-blue .stat-card-value { color: #93c5fd !important; }
[data-theme="dark"] .card-blue .stat-card-label { color: #60a5fa !important; }
[data-theme="dark"] .card-blue .stat-card-subtitle { color: #6b7fa8 !important; }
[data-theme="dark"] .card-blue:hover { box-shadow: 0 4px 24px rgba(59, 130, 246, 0.2) !important; }

[data-theme="dark"] .card-yellow {
    background: linear-gradient(135deg, #1a1408 0%, #312410 100%) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}
[data-theme="dark"] .card-yellow .stat-card-value { color: #fde68a !important; }
[data-theme="dark"] .card-yellow .stat-card-label { color: #fbbf24 !important; }
[data-theme="dark"] .card-yellow .stat-card-subtitle { color: #8a7a5a !important; }
[data-theme="dark"] .card-yellow:hover { box-shadow: 0 4px 24px rgba(245, 158, 11, 0.2) !important; }

[data-theme="dark"] .card-orange {
    background: linear-gradient(135deg, #1a0e06 0%, #341a09 100%) !important;
    border: 1px solid rgba(249, 115, 22, 0.3) !important;
}
[data-theme="dark"] .card-orange .stat-card-value { color: #fdba74 !important; }
[data-theme="dark"] .card-orange .stat-card-label { color: #fb923c !important; }
[data-theme="dark"] .card-orange .stat-card-subtitle { color: #8a6a4a !important; }
[data-theme="dark"] .card-orange:hover { box-shadow: 0 4px 24px rgba(249, 115, 22, 0.2) !important; }

[data-theme="dark"] .card-green {
    background: linear-gradient(135deg, #061a0e 0%, #0f3320 100%) !important;
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
}
[data-theme="dark"] .card-green .stat-card-value { color: #86efac !important; }
[data-theme="dark"] .card-green .stat-card-label { color: #4ade80 !important; }
[data-theme="dark"] .card-green .stat-card-subtitle { color: #5a8a6a !important; }
[data-theme="dark"] .card-green:hover { box-shadow: 0 4px 24px rgba(34, 197, 94, 0.2) !important; }

[data-theme="dark"] .card-purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(124, 58, 237, 0.06) 100%) !important;
    border-color: rgba(139, 92, 246, 0.2) !important;
}
[data-theme="dark"] .card-purple .stat-card-value { color: #c4b5fd !important; }
[data-theme="dark"] .card-purple .stat-card-label { color: #a78bfa !important; }
[data-theme="dark"] .card-purple .stat-card-subtitle { color: #7a6a9a !important; }
[data-theme="dark"] .card-purple:hover { box-shadow: 0 4px 24px rgba(139, 92, 246, 0.2) !important; }

/* Dark stat card text — gut lesbar */
[data-theme="dark"] .stat-card-label { color: #8892a4; }
[data-theme="dark"] .stat-card-value { color: #fff; font-weight: 800; }
[data-theme="dark"] .stat-card-subtitle { color: #565f70; }

/* Dark mode table */
[data-theme="dark"] .data-table th {
    background: rgba(255, 255, 255, 0.02);
    border-bottom-color: rgba(255, 255, 255, 0.06);
    color: #565f70;
}

[data-theme="dark"] .data-table td {
    border-bottom-color: rgba(255, 255, 255, 0.04);
    color: #c8d0de;
}

[data-theme="dark"] .data-table tbody tr:hover {
    background: rgba(249, 115, 22, 0.04);
}

/* Dark mode badges */
[data-theme="dark"] .badge-open { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
[data-theme="dark"] .badge-in_progress { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
[data-theme="dark"] .badge-waiting { background: rgba(234, 179, 8, 0.12); color: #facc15; }
[data-theme="dark"] .badge-closed { background: rgba(34, 197, 94, 0.12); color: #4ade80; }
[data-theme="dark"] .badge-high { background: rgba(239, 68, 68, 0.12); color: #f87171; font-weight: 600; }
[data-theme="dark"] .badge-medium { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
[data-theme="dark"] .badge-low { background: rgba(99, 102, 241, 0.12); color: #818cf8; }
[data-theme="dark"] .badge-neutral { background: rgba(255, 255, 255, 0.06); color: #8892a4; }

/* Dark mode buttons */
[data-theme="dark"] .btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: #c8d0de;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
[data-theme="dark"] .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Dark mode filter buttons */
[data-theme="dark"] .filter-btn.active {
    background: linear-gradient(135deg, #ea580c, #f97316);
    color: #fff;
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.3);
}
[data-theme="dark"] .filter-btn:not(.active) {
    color: #8892a4;
}
[data-theme="dark"] .filter-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.04);
    color: #c8d0de;
    border-color: rgba(255, 255, 255, 0.08);
}

/* Dark mode tab buttons */
[data-theme="dark"] .tab-btn:not(.active) {
    color: #8892a4;
}
[data-theme="dark"] .tab-btn:not(.active):hover {
    color: #c8d0de;
    background: rgba(255, 255, 255, 0.04);
}

/* Dark mode forms */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] .form-input {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
    color: #e8ecf4;
}
[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] .form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

/* Dark toast */
[data-theme="dark"] .toast {
    background: #0f1525;
    border-color: rgba(255, 255, 255, 0.08);
}

/* Dark modal */
[data-theme="dark"] .modal-overlay {
    background: rgba(0, 0, 0, 0.7);
}
[data-theme="dark"] .modal {
    background: #0f1525;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Status text colors dark */
[data-theme="dark"] .status-text-open { color: #60a5fa; }
[data-theme="dark"] .status-text-in_progress { color: #fbbf24; }
[data-theme="dark"] .status-text-waiting { color: #fb923c; }
[data-theme="dark"] .status-text-closed { color: #4ade80; }
[data-theme="dark"] .status-text-resolved { color: #4ade80; }

/* Dark mode admin dropdown */
[data-theme="dark"] .admin-dropdown-btn {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
    color: #8892a4;
}
[data-theme="dark"] .admin-dropdown-menu {
    background: #0f1525;
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .admin-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #e8ecf4;
}
[data-theme="dark"] .admin-dropdown-item.active {
    background: rgba(249, 115, 22, 0.08);
    color: #fb923c;
}

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

body {
    margin: 0;
    font-family: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
                 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg-page);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    transition: background var(--transition-slow), color var(--transition-slow);
}

.font-mono,
.ticket-number,
code,
pre {
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
}

#app {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   Navigation Buttons (Sidebar)
   ============================================================ */
.nav-btn {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: transparent;
    color: #9ca3af;
    text-align: left;
}

.nav-btn::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
    transition: height var(--transition-fast);
}

.nav-btn:hover {
    background: rgba(249, 115, 22, 0.08);
    color: #fff;
}

.nav-btn.active {
    background: rgba(249, 115, 22, 0.12);
    color: #fff;
}

.nav-btn.active::before {
    height: 24px;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
}

.nav-btn svg,
.nav-btn .icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ============================================================
   Stat Cards — Glassmorphism-Style
   ============================================================ */
.stat-card {
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Farbige Leiste oben (3px) */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card.accent {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    box-shadow: var(--shadow-lg), 0 0 24px rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.25);
}

.stat-card.accent::before {
    background: var(--accent-gradient);
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.5);
}

/* ---- Light Mode: Stat-Cards mit weissem Hintergrund + farbiger Top-Leiste ---- */
.stat-card.card-blue {
    background: #fff;
    border: 1px solid #bfdbfe;
    box-shadow: var(--shadow-sm);
    color: #111827;
}
.stat-card.card-blue::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stat-card.card-blue .stat-card-value { color: #1d4ed8; }
.stat-card.card-blue .stat-card-label { color: #3b82f6; }
.stat-card.card-blue .stat-card-subtitle { color: #6b7280; }

.stat-card.card-yellow {
    background: #fff;
    border: 1px solid #fde68a;
    box-shadow: var(--shadow-sm);
    color: #111827;
}
.stat-card.card-yellow::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-card.card-yellow .stat-card-value { color: #b45309; }
.stat-card.card-yellow .stat-card-label { color: #d97706; }
.stat-card.card-yellow .stat-card-subtitle { color: #6b7280; }

.stat-card.card-orange {
    background: #fff;
    border: 1px solid #fdba74;
    box-shadow: var(--shadow-sm);
    color: #111827;
}
.stat-card.card-orange::before { background: linear-gradient(90deg, #f97316, #fb923c); }
.stat-card.card-orange .stat-card-value { color: #c2410c; }
.stat-card.card-orange .stat-card-label { color: #ea580c; }
.stat-card.card-orange .stat-card-subtitle { color: #6b7280; }

.stat-card.card-green {
    background: #fff;
    border: 1px solid #86efac;
    box-shadow: var(--shadow-sm);
    color: #111827;
}
.stat-card.card-green::before { background: linear-gradient(90deg, #22c55e, #4ade80); }
.stat-card.card-green .stat-card-value { color: #15803d; }
.stat-card.card-green .stat-card-label { color: #16a34a; }
.stat-card.card-green .stat-card-subtitle { color: #6b7280; }

.stat-card.card-purple {
    background: #fff;
    border: 1px solid #e9d5ff;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.stat-card.card-purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.stat-card.card-purple .stat-card-value { color: #6d28d9; }
.stat-card.card-purple .stat-card-label { color: #7c3aed; }
.stat-card.card-purple .stat-card-subtitle { color: #6b7280; }

/* Light-Mode Override: Standard-Cards ohne Farbklasse */
.stat-card:not(.accent):not(.card-blue):not(.card-yellow):not(.card-orange):not(.card-green):not(.card-purple) {
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.stat-card:not(.accent):not(.card-blue):not(.card-yellow):not(.card-orange):not(.card-green):not(.card-purple):hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* Hover fuer alle farbigen Cards */
.stat-card.accent:hover,
.stat-card.card-blue:hover,
.stat-card.card-yellow:hover,
.stat-card.card-orange:hover,
.stat-card.card-purple:hover,
.stat-card.card-green:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 32px rgba(255, 255, 255, 0.08);
}

.stat-card-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.stat-card.accent .stat-card-label {
    color: #9ca3af;
}

.stat-card:not(.accent) .stat-card-label {
    color: var(--text-secondary);
}

.stat-card-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-card-subtitle {
    font-size: 13px;
}

.stat-card.accent .stat-card-subtitle {
    color: #d1d5db;
}

.stat-card:not(.accent) .stat-card-subtitle {
    color: var(--text-secondary);
}

/* ============================================================
   Badges
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

/* Status Badges */
.badge-open { background: #dbeafe; color: #1e40af; }
.badge-in_progress { background: #fef3c7; color: #92400e; }
.badge-waiting { background: #fef9c3; color: #854d0e; }
.badge-closed { background: #d1fae5; color: #065f46; }

/* Priority Badges */
.badge-high { background: #fee2e2; color: #991b1b; font-weight: 600; }
.badge-medium { background: #fef3c7; color: #92400e; }
.badge-low { background: #e0e7ff; color: #3730a3; }

/* Sentiment Badges */
.badge-positive { background: #d1fae5; color: #065f46; }
.badge-neutral { background: #e5e7eb; color: #374151; }
.badge-negative { background: #fee2e2; color: #991b1b; }

/* Priority Badges (neue Klassen) */
.priority-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.3; }
.priority-urgent { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.priority-high { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.priority-medium { background: #fefce8; color: #a16207; border: 1px solid #fde68a; }
.priority-low { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.priority-default { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }

[data-theme="dark"] .priority-urgent { background: rgba(239,68,68,0.12); color: #f87171; border-color: rgba(239,68,68,0.3); }
[data-theme="dark"] .priority-high { background: rgba(249,115,22,0.12); color: #fb923c; border-color: rgba(249,115,22,0.3); }
[data-theme="dark"] .priority-medium { background: rgba(234,179,8,0.12); color: #fbbf24; border-color: rgba(234,179,8,0.3); }
[data-theme="dark"] .priority-low { background: rgba(34,197,94,0.12); color: #4ade80; border-color: rgba(34,197,94,0.3); }
[data-theme="dark"] .priority-default { background: rgba(255,255,255,0.06); color: #8892a4; border-color: rgba(255,255,255,0.1); }

/* Status Badges (neue Klassen) */
.status-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; line-height: 1.3; }
.status-open { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.status-progress { background: #f3e8ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.status-waiting { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.status-resolved { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.status-closed { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.status-spam { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.status-default { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }

[data-theme="dark"] .status-open { background: rgba(59,130,246,0.12); color: #60a5fa; border-color: rgba(59,130,246,0.3); }
[data-theme="dark"] .status-progress { background: rgba(124,58,237,0.12); color: #a78bfa; border-color: rgba(124,58,237,0.3); }
[data-theme="dark"] .status-waiting { background: rgba(234,179,8,0.12); color: #fbbf24; border-color: rgba(234,179,8,0.3); }
[data-theme="dark"] .status-resolved { background: rgba(34,197,94,0.12); color: #4ade80; border-color: rgba(34,197,94,0.3); }
[data-theme="dark"] .status-closed { background: rgba(16,185,129,0.12); color: #34d399; border-color: rgba(16,185,129,0.3); }
[data-theme="dark"] .status-spam { background: rgba(239,68,68,0.12); color: #f87171; border-color: rgba(239,68,68,0.3); }
[data-theme="dark"] .status-default { background: rgba(255,255,255,0.06); color: #8892a4; border-color: rgba(255,255,255,0.1); }

/* Confidence Badges */
.confidence-high { color: #059669; font-weight: 600; }
.confidence-medium { color: #d97706; font-weight: 600; }
.confidence-low { color: #dc2626; font-weight: 600; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 50%, #fb923c 100%);
    color: #fff;
    box-shadow: 0 2px 12px rgba(249, 115, 22, 0.4), 0 0 0 0 rgba(249, 115, 22, 0);
    border: none;
    border-radius: 9999px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.55), 0 0 24px rgba(249, 115, 22, 0.2);
    filter: brightness(1.08);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 9999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--text-muted);
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

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

/* ============================================================
   Tab Buttons — Pill-Style
   ============================================================ */
.tab-btn {
    padding: 7px 18px;
    font-size: 13px;
    border-radius: 9999px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: transparent;
    color: var(--text-secondary);
}

.tab-btn.active {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 50%, #fb923c 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.35);
}

.tab-btn:not(.active):hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
    border-color: var(--border);
}

/* ============================================================
   Filter Buttons — Pill-Style
   ============================================================ */
.filter-btn {
    padding: 7px 16px;
    font-size: 13px;
    border-radius: 9999px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn.active {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.35);
    border-color: transparent;
}

.filter-btn:not(.active) {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.filter-btn:not(.active):hover {
    background: var(--border-light);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

/* ============================================================
   Table
   ============================================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    background: var(--border-light);
}

.data-table td {
    padding: 9px 12px;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--border-light);
}

.ticket-row {
    cursor: pointer;
}

/* Ticket-Zeile: Farbleiste links per Status */
.ticket-row td:first-child {
    padding-left: 0;
    position: relative;
}

.ticket-status-bar {
    display: inline-block;
    width: 4px;
    align-self: stretch;
    border-radius: 0 2px 2px 0;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Status-Farbleisten-Farben */
.status-bar-open    { background: #3b82f6; box-shadow: 0 0 6px rgba(59, 130, 246, 0.4); }
.status-bar-in_progress { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.4); }
.status-bar-waiting { background: #f97316; box-shadow: 0 0 6px rgba(249, 115, 22, 0.4); }
.status-bar-closed  { background: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.4); }
.status-bar-resolved { background: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.4); }
.status-bar-spam    { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.4); }
.status-bar-default { background: #6b7280; }

/* Status-Text (kein Badge mehr, nur Text mit Farbe) */
.status-text-open       { color: #3b82f6; font-weight: 600; }
.status-text-in_progress { color: #f59e0b; font-weight: 600; }
.status-text-waiting    { color: #f97316; font-weight: 600; }
.status-text-closed     { color: #22c55e; font-weight: 600; }
.status-text-resolved   { color: #22c55e; font-weight: 600; }
.status-text-spam       { color: #ef4444; font-weight: 600; }

/* ============================================================
   Form Elements
   ============================================================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select {
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-fast);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-fast);
    line-height: 1.5;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

select.form-input {
    appearance: auto;
    -webkit-appearance: auto;
    cursor: pointer;
}

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

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

/* ============================================================
   Range Slider
   ============================================================ */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--range-progress, 50%), var(--border) var(--range-progress, 50%), var(--border) 100%);
    border-radius: 4px;
    cursor: pointer;
    outline: none;
    border: none;
    padding: 0;
    margin: 8px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 3px solid var(--accent);
    border-radius: 50%;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.35);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #fff;
    border: 3px solid var(--accent);
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"]::-moz-range-progress {
    background: var(--accent);
    border-radius: 4px;
    height: 8px;
}

input[type="range"]::-moz-range-track {
    background: var(--border);
    border-radius: 4px;
    height: 8px;
}

/* ============================================================
   Action Buttons
   ============================================================ */
.action-btn {
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    text-align: left;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    border-width: 1px;
    border-style: solid;
    transition: all var(--transition-fast);
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ============================================================
   Loading Spinner
   ============================================================ */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-light);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ============================================================
   Animations
   ============================================================ */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* ============================================================
   Scrollbar
   ============================================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* ============================================================
   Utility Classes
   ============================================================ */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.skeleton {
    background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

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

/* ============================================================
   Notification Badge
   ============================================================ */
.notification-badge {
    background: linear-gradient(135deg, #ea580c, #f97316);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 9999px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
}

/* ============================================================
   Toast Notifications
   ============================================================ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    box-shadow: var(--shadow-xl);
    max-width: 360px;
    animation: slideUp var(--transition-slow);
    pointer-events: auto;
}

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

.toast.success { border-left: 4px solid #22c55e; background: #059669; color: #fff; }
.toast.success div { color: #fff !important; }
.toast.success button { color: rgba(255,255,255,0.7) !important; }
.toast.error { border-left: 4px solid #ef4444; background: #dc2626; color: #fff; }
.toast.error div { color: #fff !important; }
.toast.error button { color: rgba(255,255,255,0.7) !important; }
.toast.warning { border-left: 4px solid #f59e0b; background: #d97706; color: #fff; }
.toast.warning div { color: #fff !important; }
.toast.warning button { color: rgba(255,255,255,0.7) !important; }
.toast.info { border-left: 4px solid #3b82f6; background: #2563eb; color: #fff; }
.toast.info div { color: #fff !important; }
.toast.info button { color: rgba(255,255,255,0.7) !important; }

/* ============================================================
   Cards
   ============================================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    animation: fadeIn var(--transition-base);
}

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

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    animation: scaleIn var(--transition-base);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================================
   Admin Dropdown Navigation
   ============================================================ */
.admin-nav {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.admin-dropdown {
    position: relative;
}

.admin-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.admin-dropdown-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent);
    background: var(--accent-soft);
}

.admin-dropdown-btn.has-active {
    color: var(--accent);
    border-color: var(--accent-border);
    background: var(--accent-soft);
    font-weight: 600;
}

.admin-dropdown-chevron {
    width: 14px;
    height: 14px;
    transition: transform var(--transition-fast);
    flex-shrink: 0;
}

.admin-dropdown.open .admin-dropdown-chevron {
    transform: rotate(180deg);
}

.admin-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 100;
    animation: dropdownIn var(--transition-fast);
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.admin-dropdown.open .admin-dropdown-menu {
    display: block;
}

.admin-dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
    gap: 8px;
}

.admin-dropdown-item:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

.admin-dropdown-item.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.admin-dropdown-item.active::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

/* ============================================================
   Dark Mode Toggle
   ============================================================ */
.dark-mode-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
    border: none;
    background: transparent;
    width: 100%;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
}

.dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.dark-mode-track {
    position: relative;
    width: 32px;
    height: 18px;
    background: #374151;
    border-radius: 9999px;
    transition: background var(--transition-base);
    flex-shrink: 0;
}

.dark-mode-track.active {
    background: var(--accent);
}

.dark-mode-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--transition-base);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.dark-mode-track.active .dark-mode-thumb {
    transform: translateX(14px);
}

/* ============================================================
   Help Page — Steps, Pipeline, FAQ, Tables
   ============================================================ */
.help-content p {
    margin: 0;
}

.help-steps {
    display: grid;
    gap: 12px;
}

.help-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
}

.help-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #111827 0%, #374151 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.help-step strong {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.help-step p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.help-pipeline {
    display: grid;
    gap: 4px;
}

.help-pipeline-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.help-pipeline-step:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.help-pipeline-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    flex-shrink: 0;
}

.help-pipeline-step strong {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.help-pipeline-step span {
    font-size: 12px;
    color: var(--text-secondary);
}

.help-pipeline-arrow {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1;
}

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

.help-table td {
    padding: 12px 14px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
}

.help-table tr:last-child td {
    border-bottom: none;
}

.help-table tr:hover {
    background: var(--border-light);
}

.help-faq-item {
    transition: box-shadow var(--transition-fast);
}

.help-faq-item:hover {
    box-shadow: var(--shadow-sm);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .nav-btn {
        font-size: 13px;
        padding: 8px 10px;
        gap: 8px;
    }

    .stat-card-value {
        font-size: 24px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .admin-nav {
        gap: 4px;
    }

    .admin-dropdown-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}
