:root {
    --primary: #1B2A4A;
    --primary-light: #2A3F6B;
    --accent: #2C5FA1;
    --accent-light: #3B72B8;
    --bg: #F5F7FA;
    --bg-card: #FFFFFF;
    --border: #D8DFE8;
    --border-focus: #2C5FA1;
    --text: #1A2332;
    --text-muted: #5A6A7E;
    --text-dim: #8A95A5;
    --success: #1D7A4E;
    --success-bg: #E8F5EE;
    --danger: #C0392B;
    --danger-bg: #FDE8E8;
    --warning: #D4A017;
    --warning-bg: #FEF3E0;
    --radius: 10px;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
.app-header {
    background: var(--primary);
    color: white;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}
.app-header .logo { height: 36px; border-radius: 4px; }
.app-header .title { font-size: 18px; font-weight: 600; }
.app-header .user-info { display: flex; align-items: center; gap: 12px; font-size: 14px; }

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

/* KPI Cards */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-card { padding: 16px 20px; }
.kpi-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.kpi-value { font-size: 24px; font-weight: 700; margin-top: 4px; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--border); color: var(--text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.data-table tr:hover { background: rgba(44, 95, 161, 0.03); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 6px; border: none;
    font-family: inherit; font-size: 14px; font-weight: 500;
    cursor: pointer; transition: all 0.15s;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--primary-light); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 5px 10px; font-size: 13px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 8px 12px; border: 1px solid var(--border);
    border-radius: 6px; font-family: inherit; font-size: 14px;
    background: white; color: var(--text);
    transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(44,95,161,0.1); }
.form-textarea { min-height: 120px; resize: vertical; }

/* Status Badges */
.badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }

/* Ampel */
.ampel { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.ampel-gruen { background: var(--success); }
.ampel-gelb { background: var(--warning); }
.ampel-rot { background: var(--danger); }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.tab { padding: 10px 20px; cursor: pointer; font-weight: 500; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.15s; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab:hover:not(.active) { color: var(--text); }

/* Notifications */
.notification {
    position: fixed; bottom: 20px; right: 20px; padding: 12px 20px;
    border-radius: 8px; font-size: 14px; font-weight: 500;
    box-shadow: var(--shadow-lg); z-index: 1000;
    animation: slideIn 0.3s ease;
}
.notification-success { background: var(--success); color: white; }
.notification-error { background: var(--danger); color: white; }

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

/* Loading */
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Nav */
.sidebar { width: 240px; background: white; border-right: 1px solid var(--border); min-height: calc(100vh - 60px); padding: 16px 0; }
.sidebar a, .sidebar .nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.15s; cursor: pointer; }
.sidebar a:hover, .sidebar .nav-item:hover { background: var(--bg); color: var(--text); }
.sidebar a.active, .sidebar .nav-item.active { background: rgba(44,95,161,0.08); color: var(--accent); border-right: 3px solid var(--accent); }

/* Layout */
.app-layout { display: flex; }
.main-content { flex: 1; padding: 24px; max-width: calc(100% - 240px); }
.container { max-width: 1200px; margin: 0 auto; padding: 24px; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { max-width: 100%; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
