/* ============================================================================
   SEO CRM - Content Bär
   Design: Dark/Light Mode mit CI-Farbe Gelb (#F5BE4D)
   ============================================================================ */

/* CSS Variables - Dark Mode (Default) */
:root {
    /* Colors - Dark Luxury Palette */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a24;
    --bg-card: #16161f;
    --bg-hover: #1e1e2a;
    
    /* Accent Colors - CI Farbe Gelb */
    --accent-primary: #F5BE4D;
    --accent-primary-light: #FFD06B;
    --accent-primary-dark: #D4A43E;
    --accent-secondary: #ffd700;
    --accent-tertiary: #ff6b6b;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    --text-accent: var(--accent-primary);
    
    /* Status Colors */
    --status-success: #00d4aa;
    --status-warning: #ffd700;
    --status-danger: #ff6b6b;
    --status-info: #00b4d8;
    
    /* Borders */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-light: rgba(255, 255, 255, 0.12);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(245, 190, 77, 0.15);
    
    /* Typography */
    --font-primary: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Spacing */
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* ============================================================================
   Light Mode Theme - Verbesserter Kontrast
   ============================================================================ */

[data-theme="light"] {
    /* Backgrounds - Klare Abstufungen */
    --bg-primary: #f5f6f8;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef0f4;
    --bg-card: #ffffff;
    --bg-hover: #e8eaef;
    
    /* Accent Colors - CI Farbe bleibt */
    --accent-primary: #F5BE4D;
    --accent-primary-light: #F5BE4D;
    --accent-primary-dark: #F5BE4D;
    --accent-secondary: #C9990A;
    --accent-tertiary: #e55050;
    
    /* Text Colors - Hoher Kontrast */
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a5a;
    --text-muted: #7a7a8a;
    --text-accent: #B8922F;
    
    /* Status Colors - Angepasst für Light Mode */
    --status-success: #00a080;
    --status-warning: #c99000;
    --status-danger: #dc3545;
    --status-info: #0077b6;
    
    /* Borders - Sichtbarer */
    --border-color: rgba(0, 0, 0, 0.1);
    --border-color-light: rgba(0, 0, 0, 0.15);
    
    /* Shadows - Stärker für Tiefe */
    --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-glow: 0 4px 20px rgba(212, 164, 62, 0.2);
}

/* Background Texture für Light Mode */
[data-theme="light"] body::before {
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(212, 164, 62, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(212, 164, 62, 0.02) 0%, transparent 50%);
}

/* ============================================================================
   Reset & Base
   ============================================================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Texture - Dark Mode */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(245, 190, 77, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 215, 0, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary-light);
}

/* ============================================================================
   App Container & Layout
   ============================================================================ */

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

/* ============================================================================
   Sidebar
   ============================================================================ */

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform var(--transition-normal);
}

[data-theme="light"] .sidebar {
    box-shadow: var(--shadow-md);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dark));
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
}

.logo-icon i {
    width: 22px;
    height: 22px;
    color: #ffffff;
}

[data-theme="light"] .logo-icon i {
    color: #ffffff;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--accent-primary);
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 28px;
}

.nav-section-title {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-fast);
    margin-bottom: 4px;
}

.nav-link i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(245, 190, 77, 0.15), rgba(245, 190, 77, 0.05));
    color: var(--accent-primary);
    border: 1px solid rgba(245, 190, 77, 0.2);
}

[data-theme="light"] .nav-link.active {
    background: linear-gradient(135deg, rgba(212, 164, 62, 0.2), rgba(212, 164, 62, 0.08));
    color: var(--accent-primary-dark);
    border: 1px solid rgba(212, 164, 62, 0.3);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    background: var(--bg-tertiary);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #ffffff;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.user-actions {
    display: flex;
    gap: 4px;
}

/* ============================================================================
   Main Content
   ============================================================================ */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.topbar {
    height: var(--topbar-height);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
}

[data-theme="light"] .topbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Mobile Menu Toggle - VERSTECKT auf Desktop */
.mobile-menu-toggle {
    display: none !important;
}

.breadcrumb {
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--accent-primary);
}

.breadcrumb .separator {
    color: var(--text-muted);
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.current-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.current-date i {
    width: 16px;
    height: 16px;
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 32px;
}

/* ============================================================================
   Flash Messages / Alerts
   ============================================================================ */

.flash-messages {
    padding: 16px 32px 0;
}

.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 12px;
    animation: slideIn 0.3s ease;
}

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

.alert i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.alert span {
    flex: 1;
}

.alert-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: inherit;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.alert-close:hover {
    opacity: 1;
}

.alert-close i {
    width: 16px;
    height: 16px;
}

.alert-success {
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.3);
    color: var(--status-success);
}

.alert-danger {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: var(--status-danger);
}

.alert-warning {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: var(--status-warning);
}

.alert-info {
    background: rgba(0, 180, 216, 0.1);
    border: 1px solid rgba(0, 180, 216, 0.3);
    color: var(--status-info);
}

[data-theme="light"] .alert-success {
    background: rgba(0, 160, 128, 0.1);
    border: 1px solid rgba(0, 160, 128, 0.3);
}

[data-theme="light"] .alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

[data-theme="light"] .alert-warning {
    background: rgba(201, 144, 0, 0.1);
    border: 1px solid rgba(201, 144, 0, 0.3);
}

[data-theme="light"] .alert-info {
    background: rgba(0, 119, 182, 0.1);
    border: 1px solid rgba(0, 119, 182, 0.3);
}

/* ============================================================================
   Page Header
   ============================================================================ */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 24px;
}

.page-header-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.page-header-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.page-header-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* ============================================================================
   Buttons
   ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn i {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dark));
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(245, 190, 77, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 190, 77, 0.4);
    color: #ffffff;
}

[data-theme="light"] .btn-primary {
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(212, 164, 62, 0.3);
}

[data-theme="light"] .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(212, 164, 62, 0.4);
    color: #ffffff;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color-light);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.btn-danger {
    background: rgba(255, 107, 107, 0.15);
    color: var(--status-danger);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
    background: rgba(255, 107, 107, 0.25);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-sm i {
    width: 14px;
    height: 14px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    background: transparent;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--accent-primary);
}

.btn-icon i {
    width: 18px;
    height: 18px;
}

/* ============================================================================
   Cards
   ============================================================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--border-color-light);
    box-shadow: var(--shadow-md);
}

[data-theme="light"] .card {
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .card-footer {
    background: var(--bg-tertiary);
}

/* ============================================================================
   Stats Cards
   ============================================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px 24px;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

[data-theme="light"] .stat-card {
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

[data-theme="light"] .stat-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card-icon i {
    width: 24px;
    height: 24px;
}

.stat-card-content {
    display: flex;
    flex-direction: column;
}
.stat-card-icon.teal {
    background: rgba(245, 190, 77, 0.15);
    color: var(--accent-primary);
}

.stat-card-icon.gold {
    background: rgba(255, 215, 0, 0.15);
    color: var(--accent-secondary);
}

.stat-card-icon.coral {
    background: rgba(255, 107, 107, 0.15);
    color: var(--status-danger);
}

.stat-card-icon.blue {
    background: rgba(0, 180, 216, 0.15);
    color: var(--status-info);
}

[data-theme="light"] .stat-card-icon.teal {
    background: rgba(212, 164, 62, 0.15);
}

[data-theme="light"] .stat-card-icon.gold {
    background: rgba(201, 144, 0, 0.15);
}

[data-theme="light"] .stat-card-icon.coral {
    background: rgba(220, 53, 69, 0.12);
}

[data-theme="light"] .stat-card-icon.blue {
    background: rgba(0, 119, 182, 0.12);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.stat-card-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ============================================================================
   Tables
   ============================================================================ */

.table-container {
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: 14px 16px;
    text-align: left;
}

.table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.table td {
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table tr:hover td {
    background: var(--bg-hover);
}

.table-actions {
    display: flex;
    gap: 4px;
}

/* ============================================================================
   Forms
   ============================================================================ */

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

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

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(245, 190, 77, 0.1);
}

[data-theme="light"] .form-control:focus {
    box-shadow: 0 0 0 3px rgba(212, 164, 62, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

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

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

[data-theme="light"] select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a4a5a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.form-check label {
    cursor: pointer;
    font-size: 0.95rem;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Multi-select */
.multi-select {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    min-height: 50px;
}

.multi-select-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--bg-hover);
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
}

.multi-select-item input {
    accent-color: var(--accent-primary);
}

/* ============================================================================
   Status Badges
   ============================================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-active, .badge-open {
    background: rgba(0, 212, 170, 0.15);
    color: var(--status-success);
}

.badge-paused, .badge-in_progress {
    background: rgba(255, 215, 0, 0.15);
    color: var(--status-warning);
}

.badge-completed {
    background: rgba(0, 180, 216, 0.15);
    color: var(--status-info);
}

.badge-cancelled, .badge-urgent {
    background: rgba(255, 107, 107, 0.15);
    color: var(--status-danger);
}

.badge-review {
    background: rgba(138, 43, 226, 0.15);
    color: #b57edc;
}

.badge-high {
    background: rgba(255, 140, 0, 0.15);
    color: #ffa500;
}

.badge-medium {
    background: rgba(255, 215, 0, 0.15);
    color: var(--status-warning);
}

.badge-low {
    background: rgba(128, 128, 128, 0.15);
    color: #888;
}

[data-theme="light"] .badge-active,
[data-theme="light"] .badge-open {
    background: rgba(0, 160, 128, 0.12);
}

[data-theme="light"] .badge-paused,
[data-theme="light"] .badge-in_progress {
    background: rgba(201, 144, 0, 0.12);
}

[data-theme="light"] .badge-completed {
    background: rgba(0, 119, 182, 0.12);
}

[data-theme="light"] .badge-cancelled,
[data-theme="light"] .badge-urgent {
    background: rgba(220, 53, 69, 0.12);
}

[data-theme="light"] .badge-review {
    background: rgba(138, 43, 226, 0.12);
    color: #8b2ecf;
}

[data-theme="light"] .badge-high {
    background: rgba(255, 140, 0, 0.12);
    color: #cc7000;
}

[data-theme="light"] .badge-medium {
    background: rgba(201, 144, 0, 0.12);
}

/* ============================================================================
   Project Cards
   ============================================================================ */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    transition: all var(--transition-normal);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    min-height: 400px;
    overflow: hidden;
}

.project-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    color: inherit;
}

[data-theme="light"] .project-card {
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .project-card:hover {
    box-shadow: var(--shadow-lg);
}

.project-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    min-height: 70px;
    flex-shrink: 0;
}

.project-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.project-card-client {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.project-card-meta {
    display: flex;
    gap: 16px;
    align-self: end;
}

.project-card-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.project-card-meta-item i {
    width: 14px;
    height: 14px;
}

.project-card-progress {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.project-card-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.project-card-progress-label span:first-child {
    color: var(--text-secondary);
}

.project-card-progress-label span:last-child {
    color: var(--accent-primary);
    font-weight: 600;
}

.progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-primary-light));
    border-radius: 3px;
    transition: width var(--transition-slow);
}

.progress-bar-fill.warning {
    background: linear-gradient(90deg, var(--status-warning), #ffed4a);
}

.progress-bar-fill.danger {
    background: linear-gradient(90deg, var(--status-danger), #ff9999);
}

/* ============================================================================
   Task Items
   ============================================================================ */

.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.task-item:hover {
    border-color: var(--border-color-light);
    background: var(--bg-hover);
}

[data-theme="light"] .task-item {
    box-shadow: var(--shadow-sm);
}

.task-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color-light);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.task-checkbox:hover {
    border-color: var(--accent-primary);
}

.task-checkbox.checked {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.task-checkbox.checked i {
    color: #ffffff;
}

.task-checkbox i {
    width: 14px;
    height: 14px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.task-checkbox.checked i {
    opacity: 1;
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.task-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-meta-item i {
    width: 12px;
    height: 12px;
}

.task-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.task-item:hover .task-actions {
    opacity: 1;
}

/* ============================================================================
   Empty State
   ============================================================================ */

.empty-state {
    text-align: center;
    padding: 60px 40px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-icon i {
    width: 40px;
    height: 40px;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ============================================================================
   Tabs / Filter Pills
   ============================================================================ */

.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.filter-tab:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.filter-tab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff;
}

/* ============================================================================
   Detail Page Sections
   ============================================================================ */

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.info-item {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
}

.info-item-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.info-item-value {
    font-size: 1rem;
    font-weight: 500;
}

.info-item-value a {
    word-break: break-all;
}

/* ============================================================================
   Navigation Tabs (Project Detail)
   ============================================================================ */

.nav-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    margin-bottom: 24px;
}

.nav-tab {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-tab i {
    width: 16px;
    height: 16px;
}

.nav-tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-tab.active {
    background: var(--accent-primary);
    color: #ffffff;
}

/* ============================================================================
   Contact Cards
   ============================================================================ */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    transition: all var(--transition-fast);
}

.contact-card:hover {
    border-color: var(--border-color-light);
}

[data-theme="light"] .contact-card {
    box-shadow: var(--shadow-sm);
}

.contact-card.primary {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(245, 190, 77, 0.05), transparent);
}

[data-theme="light"] .contact-card.primary {
    background: linear-gradient(135deg, rgba(212, 164, 62, 0.08), transparent);
}

.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.contact-name {
    font-weight: 600;
    font-size: 1rem;
}

.contact-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.contact-info-item i {
    width: 14px;
    height: 14px;
    color: var(--accent-primary);
}

/* ============================================================================
   Time Entry Cards
   ============================================================================ */

.time-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.time-summary-card {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: var(--border-radius-sm);
    text-align: center;
}

[data-theme="light"] .time-summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.time-summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.time-summary-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ============================================================================
   Document Cards
   ============================================================================ */

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.document-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    transition: all var(--transition-fast);
}

.document-card:hover {
    border-color: var(--accent-primary);
}

[data-theme="light"] .document-card {
    box-shadow: var(--shadow-sm);
}

.document-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.document-icon i {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
}

.document-name {
    font-weight: 500;
    margin-bottom: 4px;
    word-break: break-word;
}

.document-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.document-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* ============================================================================
   Auth / Login Page
   ============================================================================ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: 
        radial-gradient(ellipse at 30% 30%, rgba(245, 190, 77, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 70%, rgba(255, 215, 0, 0.05) 0%, transparent 50%),
        var(--bg-primary);
}

[data-theme="light"] .auth-container {
    background: 
        radial-gradient(ellipse at 30% 30%, rgba(212, 164, 62, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 70%, rgba(212, 164, 62, 0.03) 0%, transparent 50%),
        var(--bg-primary);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 48px 40px;
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo .logo {
    justify-content: center;
}

.auth-title {
    text-align: center;
    margin-bottom: 32px;
}

.auth-title h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.auth-title p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-form .form-group {
    margin-bottom: 24px;
}

.auth-form .btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

/* ============================================================================
   Modal
   ============================================================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

[data-theme="light"] .modal-overlay {
    background: rgba(0, 0, 0, 0.5);
}

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

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

[data-theme="light"] .modal {
    box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ============================================================================
   Theme Toggle
   ============================================================================ */

#themeToggle {
    position: relative;
}

#themeToggle i {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#themeToggle:hover i {
    transform: rotate(15deg);
}

@keyframes iconFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.theme-icon-active {
    animation: iconFadeIn 0.3s ease;
}

/* ============================================================================
   Utilities
   ============================================================================ */

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-success {
    color: var(--status-success);
}

.text-warning {
    color: var(--status-warning);
}

.text-danger {
    color: var(--status-danger);
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* ============================================================================
   Responsive
   ============================================================================ */

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    /* Mobile Menu Toggle - NUR auf Mobile/Tablet sichtbar */
    .mobile-menu-toggle {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 20px;
    }
    
    .topbar {
        padding: 0 20px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-header-actions {
        width: 100%;
    }
    
    .page-header-actions .btn {
        flex: 1;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 32px 24px;
    }
}

/* ============================================================================
   Animations
   ============================================================================ */

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

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

.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

.animate-slide-up {
    animation: slideUp 0.4s ease;
}

/* Staggered animations for lists */
.stagger-animation > * {
    animation: slideUp 0.4s ease backwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-animation > *:nth-child(8) { animation-delay: 0.4s; }

/* ============================================================================
   Report Generator Responsive Fixes
   ============================================================================ */

/* Schnellauswahl Buttons */
.flex-wrap {
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    /* Schnellauswahl Buttons volle Breite */
    .card-body .d-flex.gap-2.flex-wrap .btn {
        flex: 1 1 calc(50% - 8px);
        min-width: 120px;
    }
    
    /* Form Rows einzeln */
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Detail Grid auf Mobile */
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    /* Task Listen kompakter */
    .task-item {
        padding: 12px;
    }
    
    .task-meta {
        flex-direction: column;
        gap: 4px;
    }
    
    /* Page Header */
    .page-header-content h1 {
        font-size: 1.5rem;
    }
    
    /* Buttons in Actions */
    .d-flex.justify-between {
        flex-direction: column;
        gap: 12px;
    }
    
    .d-flex.justify-between .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* Noch kleiner - Buttons untereinander */
    .card-body .d-flex.gap-2.flex-wrap .btn {
        flex: 1 1 100%;
    }
    
    .page-content {
        padding: 16px;
    }
    
    .card-body {
        padding: 16px;
    }
}

/* ============================================================================
   View Toggle
   ============================================================================ */

.view-toggle {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    padding: 4px;
    margin-right: 12px;
}

.view-toggle-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-toggle-btn:hover {
    color: var(--text-primary);
}

.view-toggle-btn.active {
    background: var(--accent-primary);
    color: #fff;
}

.view-toggle-btn i {
    width: 18px;
    height: 18px;
}

/* ============================================================================
   Project Card Screenshot
   ============================================================================ */

.project-card-screenshot {
    width: 100%;
    height: 160px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.project-card-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform var(--transition-normal);
}

.project-card:hover .project-card-screenshot img {
    transform: scale(1.05);
}

.project-card-screenshot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: 8px;
}

.project-card-screenshot-placeholder i {
    width: 32px;
    height: 32px;
    opacity: 0.5;
}

.project-card-screenshot-placeholder span {
    font-size: 0.8rem;
}

/* ============================================================================
   Projects List View
   ============================================================================ */

.projects-list-view .table {
    margin: 0;
}

.clickable-row {
    cursor: pointer;
    transition: background var(--transition-fast);
}

.clickable-row:hover {
    background: var(--bg-hover);
}

.project-list-thumbnail {
    width: 60px;
    height: 40px;
    object-fit: cover;
    object-position: top center;
    border-radius: 4px;
}

.project-list-thumbnail-placeholder {
    width: 60px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.project-list-thumbnail-placeholder i {
    width: 20px;
    height: 20px;
    opacity: 0.5;
}

.project-list-name {
    font-weight: 600;
}