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

:root {
    --primary: #0f172a;       
    --primary-hover: #1e293b; 
    --accent: #ff6600;        
    --accent-hover: #e65c00;
    --bg-body: #f1f5f9;       
    --bg-surface: #ffffff;    
    --border: #dadce0;        
    --text-main: #3c4043;     
    --text-muted: #64748b;    
    
    --status-success-bg: #dcfce7; --status-success-text: #166534;
    --status-warning-bg: #fef3c7; --status-warning-text: #92400e;
    --status-danger-bg: #fee2e2;  --status-danger-text: #991b1b;
}

body { margin: 0; padding: 0; font-family: 'Inter', system-ui, sans-serif; background-color: var(--bg-body); color: var(--text-main); font-size: 14px; -webkit-font-smoothing: antialiased; overflow-y: scroll; }
h1, h2, h3, h4 { color: var(--primary); font-weight: 600; margin-top: 0; }
h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 8px; }

.material-symbols-outlined { font-size: 20px; vertical-align: middle; line-height: 1; margin-right: 4px; }
.container { display: flex; flex-direction: column; min-height: 100vh; }
.content-area { flex: 1; padding: 30px; max-width: 1400px; margin: 0 auto; width: 100%; box-sizing: border-box; }

.header { background: var(--primary); padding: 0 30px; height: 64px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.header-logo img { height: 28px; display: block; } 
.main-nav { display: flex; gap: 8px; height: 100%; align-items: center; }
.nav-tab { display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 0 16px; color: #94a3b8; font-weight: 500; cursor: pointer; transition: 0.2s; border-bottom: 3px solid transparent; box-sizing: border-box; }
.nav-tab:hover { color: white; background: rgba(255,255,255,0.05); }
.nav-tab.active { color: white; border-bottom-color: var(--accent); }

.header-right { display: flex; gap: 12px; align-items: center; }
.header-right .btn-outline { background: transparent; border-color: #334155; color: #cbd5e1; }
.header-right .btn-outline:hover { background: #1e293b; border-color: #475569; color: white; }

.notif-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: #cbd5e1; background: transparent; border: none; padding: 6px; transition: 0.2s; border-radius: 4px;}
.notif-bell:hover { color: white; background: #1e293b; }
.notif-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; display: none; border: 2px solid var(--primary); }
.notif-dot.active { display: block; }
.notif-dropdown { position: absolute; top: 100%; right: 0; width: 340px; background: white; border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,0.15); border-radius: 8px; overflow: hidden; display: none; flex-direction: column; z-index: 1001; margin-top: 10px;}
.notif-dropdown.show { display: flex; animation: fadeIn 0.2s ease; }
.notif-header { padding: 15px 20px; border-bottom: 1px solid var(--border); font-weight: 600; color: var(--primary); display: flex; justify-content: space-between; align-items: center; background: #f8fafc;}
.notif-list { max-height: 350px; overflow-y: auto; }
.notif-item { padding: 15px 20px; border-bottom: 1px solid var(--border); font-size: 0.85em; color: var(--text-main); line-height: 1.5; transition: 0.2s;}
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { background: #fff7ed; border-left: 3px solid var(--accent); padding-left: 17px;}
.notif-time { font-size: 0.8em; color: var(--text-muted); margin-top: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; font-size: 0.9rem; font-weight: 500; border-radius: 6px; border: 1px solid transparent; cursor: pointer; transition: all 0.2s ease; font-family: inherit; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 4px 6px rgba(0,0,0,0.1); transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-hover); box-shadow: 0 4px 6px rgba(0,0,0,0.1); transform: translateY(-1px); }
.btn-outline { background: var(--bg-surface); border-color: var(--border); color: var(--text-main); }
.btn-outline:hover { background: var(--bg-body); border-color: #cbd5e1; }
.btn-danger { background: white; border-color: #fca5a5; color: var(--status-danger-text); }
.btn-danger:hover { background: var(--status-danger-bg); border-color: #f87171; }
.btn-icon { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 6px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; transition: 0.2s; }
.btn-icon:hover { background: #f1f5f9; color: var(--primary); }
.btn-icon.danger:hover { background: var(--status-danger-bg); color: var(--status-danger-text); }

.data-table-wrapper { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { background: #f8fafc; color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text-main); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #f8fafc; }

.form-group { margin-bottom: 16px; display: flex; flex-direction: column; width: 100%; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.form-control { padding: 10px 12px; font-size: 0.9rem; font-family: inherit; color: var(--text-main); background: var(--bg-surface); border: 1px solid var(--border); border-radius: 6px; transition: border-color 0.2s; box-sizing: border-box; width: 100%; }
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1); }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row > .form-group { flex: 1; min-width: 200px; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); z-index: 9999; display: none; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s ease; }
.modal-overlay.active { opacity: 1; }
.modal-content { background: var(--bg-surface); border-radius: 12px; width: 100%; max-width: 500px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); display: flex; flex-direction: column; max-height: 90vh; transform: scale(0.95); transition: transform 0.2s ease; }
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { margin: 0; border: none; padding: 0; font-size: 1.25rem; }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; background: #f8fafc; border-radius: 0 0 12px 12px; }

.badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: var(--status-success-bg); color: var(--status-success-text); border: 1px solid #bbf7d0; }
.badge-warning { background: var(--status-warning-bg); color: var(--status-warning-text); border: 1px solid #fde68a; }
.badge-danger { background: var(--status-danger-bg); color: var(--status-danger-text); border: 1px solid #fecaca; }
.badge-neutral { background: #f1f5f9; color: var(--text-muted); border: 1px solid var(--border); }

.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.settings-layout { display: flex; gap: 30px; align-items: flex-start; }
.settings-nav { width: 250px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; position: sticky; top: 90px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.settings-nav-item { padding: 14px 16px; display: flex; align-items: center; color: var(--text-muted); cursor: pointer; border-bottom: 1px solid var(--border); font-weight: 500; transition: 0.2s; }
.settings-nav-item:last-child { border-bottom: none; }
.settings-nav-item:hover { background: #f8fafc; color: var(--primary); }
.settings-nav-item.active { background: #fff7ed; color: var(--accent); border-left: 3px solid var(--accent); padding-left: 13px; }
.settings-content { flex: 1; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px; padding: 30px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }

.spinner { width: 24px; height: 24px; border: 3px solid rgba(0,0,0,0.1); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-surface); z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; font-weight: 600; color: var(--text-muted); }

.dash-dropdown { position: relative; display: inline-block; cursor: pointer; padding: 4px 10px; border-radius: 4px; font-weight: bold; background: transparent; user-select: none; color: var(--text-muted); transition: 0.2s; }
.dash-dropdown:hover { background: #f1f5f9; color: var(--primary); }
.dash-dropdown-menu { display: none; position: absolute; right: 0; top: 100%; padding-top: 5px; z-index: 100; min-width: 180px; text-align: left; }
.dash-dropdown:hover .dash-dropdown-menu { display: block; }
.dash-dropdown-inner { background: white; border: 1px solid var(--border); box-shadow: 0 10px 25px rgba(0,0,0,0.1); border-radius: 8px; overflow: hidden; padding: 4px 0; }
.dash-dropdown-inner a { display: flex; align-items: center; gap: 8px; padding: 10px 16px; color: var(--text-main); text-decoration: none; font-size: 0.9em; font-weight: 500; transition: 0.2s; }
.dash-dropdown-inner a:hover { background: #f8fafc; color: var(--accent); }
.dash-dropdown-inner a.text-danger:hover { color: var(--status-danger-text); background: var(--status-danger-bg); }

/* --- FIX FÜR DROPDOWNS AUF DUNKLEM GRUND (Weiße Schrift Bug) --- */
.dark-select option { color: var(--text-main); background: var(--bg-surface); }