:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #162033;
    --muted: #6b7890;
    --line: #dfe7f1;
    --primary: #1d5fd1;
    --primary-dark: #174aa3;
    --green: #198754;
    --red: #c0392b;
    --shadow: 0 10px 30px rgba(22, 32, 51, .08);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: var(--text); font-size: 16px; }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 280px; background: #10213f; color: #fff; padding: 24px; display: flex; flex-direction: column; gap: 28px; }
.brand { display: flex; gap: 14px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.14); }
.brand-logo { width: 54px; height: 54px; border-radius: 16px; background: #fff; color: #10213f; display: grid; place-items: center; font-weight: 800; }
.brand strong { display: block; font-size: 21px; }
.brand span { color: #b8c5dc; }
nav { display: grid; gap: 8px; }
.nav-link { padding: 13px 14px; border-radius: 14px; color: #dbe6f8; }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.12); color: #fff; }
.sidebar-footer { margin-top: auto; }
.logout { display: block; padding: 13px 14px; border-radius: 14px; background: rgba(255,255,255,.09); color: #fff; }
.main { flex: 1; padding: 32px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; gap: 20px; }
.eyebrow { color: var(--primary); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
h1 { margin: 4px 0 0; font-size: 32px; }
h2 { margin-top: 0; }
.userbox { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px 16px; min-width: 210px; box-shadow: var(--shadow); }
.userbox span, .userbox small { display: block; }
.userbox small { color: var(--muted); margin-top: 3px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.module-card { display: flex; flex-direction: column; min-height: 210px; }
.module-card .icon { width: 54px; height: 54px; border-radius: 16px; background: #eaf1ff; color: var(--primary); display: grid; place-items: center; font-size: 25px; font-weight: 800; margin-bottom: 16px; }
.module-card p { color: var(--muted); line-height: 1.5; }
.module-card .actions { margin-top: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; border-radius: 12px; border: 0; background: var(--primary); color: #fff; font-weight: 700; cursor: pointer; }
.btn:hover { background: var(--primary-dark); }
.btn.secondary { background: #eef3fb; color: var(--text); }
.btn.danger { background: var(--red); }
.form { display: grid; gap: 16px; max-width: 680px; }
label { display: grid; gap: 7px; font-weight: 700; }
input, select, textarea { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 16px; background: #fff; }
textarea { min-height: 130px; resize: vertical; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.alert { border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid var(--line); background: #fff; }
.alert-success { border-color: #b7e4c7; background: #ecfff3; }
.alert-error { border-color: #f5b7b1; background: #fff0ee; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 440px; }
.muted { color: var(--muted); }
.badge { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: #eef3fb; color: var(--primary); font-size: 13px; font-weight: 700; }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }
.kpi strong { display: block; font-size: 26px; margin-bottom: 5px; }
.kpi span { color: var(--muted); }
@media (max-width: 1050px) { .grid-3, .kpi-row { grid-template-columns: 1fr; } .app-shell { display: block; } .sidebar { width: 100%; } .main { padding: 20px; } .topbar { align-items: flex-start; flex-direction: column; } }

.topbar-logout{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;border-radius:999px;border:1px solid var(--border);background:#fff;color:var(--text);font-weight:700;text-decoration:none;margin-left:10px}.topbar-logout:hover{background:#f3f4f6}
.badge{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:12px;font-weight:700}.badge-success{background:#dcfce7;color:#166534}.badge-muted{background:#e5e7eb;color:#374151}
.form .inline-check{display:flex;align-items:center;gap:8px;font-weight:600}.form .inline-check input{width:auto}.subcard{border:1px solid var(--border);border-radius:16px;padding:14px;background:#f9fafb;margin-top:14px}.checkbox-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px}.checkbox-grid label{display:flex;gap:8px;align-items:center;background:#fff;border:1px solid var(--border);border-radius:12px;padding:8px}.checkbox-grid input{width:auto}.table .actions-cell{display:flex;gap:8px;flex-wrap:wrap}
:root{--border:var(--line)}
.module-actions-inline{display:flex;flex-wrap:wrap;gap:10px;margin-top:auto}
.module-actions-inline .btn{min-height:38px}
.permission-summary{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}.permission-pill{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;background:#eef3fb;color:#162033;font-size:12px;font-weight:700}.permission-pill.off{background:#f1f5f9;color:#94a3b8}.rights-hint{padding:12px 14px;border:1px solid var(--line);background:#f8fafc;border-radius:14px;color:var(--muted);margin-bottom:14px}

/* v08: einheitlicheres Portal-Design */
:root{
    --bg:#f3f6fb;
    --card:#ffffff;
    --text:#172033;
    --muted:#64748b;
    --line:#dbe4ef;
    --border:var(--line);
    --primary:#1d5fd1;
    --primary-dark:#174aa3;
    --soft:#f8fafc;
    --green:#198754;
    --red:#b42318;
    --shadow:0 12px 34px rgba(15,23,42,.08);
}
body{font-family:Arial,Helvetica,sans-serif;background:linear-gradient(180deg,#f8fbff 0%,var(--bg) 240px);color:var(--text)}
.sidebar{background:linear-gradient(180deg,#10213f 0%,#0b1730 100%);box-shadow:8px 0 30px rgba(15,23,42,.10)}
.brand-logo{box-shadow:0 8px 20px rgba(0,0,0,.12)}
.nav-link{font-weight:700;transition:.15s ease}.nav-link:hover,.nav-link.active{background:rgba(255,255,255,.14)}
.main{max-width:calc(100vw - 280px)}
.topbar{background:rgba(255,255,255,.72);border:1px solid rgba(219,228,239,.8);border-radius:24px;padding:18px 20px;box-shadow:var(--shadow);backdrop-filter:blur(8px)}
.userbox{display:flex;align-items:center;gap:12px;justify-content:space-between}.userbox span{font-weight:800}.userbox small{font-weight:600}.topbar-logout{white-space:nowrap;border-color:var(--line)}
h1{letter-spacing:-.035em}.card,.kpi{border-radius:24px;border-color:var(--line);box-shadow:var(--shadow)}
.card h2{letter-spacing:-.02em}.module-card{transition:.15s ease}.module-card:hover{transform:translateY(-2px);border-color:#b9cae1}.module-card .icon{box-shadow:inset 0 0 0 1px #d8e6ff}.btn{border-radius:13px;box-shadow:0 2px 0 rgba(15,23,42,.06);text-decoration:none}.btn.secondary{border:1px solid var(--line)}
input,select,textarea{border-color:var(--line);outline:none}input:focus,select:focus,textarea:focus{border-color:#8eb3ef;box-shadow:0 0 0 3px rgba(29,95,209,.12)}
.module-actions,.knowledge-nav .actions,.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.module-actions{margin-bottom:20px}.module-actions .btn,.knowledge-nav .btn{min-height:40px}.table{border-radius:18px;overflow:hidden;background:#fff}.table th{background:#f8fafc}.badge{white-space:nowrap}.page-actions{display:flex;gap:10px;flex-wrap:wrap}.section-card{background:#fff;border:1px solid var(--line);border-radius:24px;padding:22px;box-shadow:var(--shadow)}
@media(max-width:1050px){.main{max-width:none}.topbar{border-radius:20px}.userbox{width:100%;justify-content:flex-start}.sidebar{box-shadow:none}}


/* v10: persönliches Dashboard und Logo */
.brand-logo{overflow:hidden}
.brand-logo img{width:100%;height:100%;object-fit:contain;padding:6px;background:#fff}
.topbar-title{display:flex;align-items:center;gap:14px}
.topbar-logo{width:58px;height:58px;object-fit:contain;background:#fff;border:1px solid var(--line);border-radius:16px;padding:6px;box-shadow:0 8px 20px rgba(15,23,42,.08)}
.login-card{text-align:left}.login-logo{display:block;width:150px;max-height:90px;object-fit:contain;margin:0 auto 18px}.login-logo-fallback{width:74px;height:74px;border-radius:22px;background:#10213f;color:#fff;display:grid;place-items:center;font-weight:900;font-size:22px;margin:0 auto 18px}
.dashboard-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:22px}.dashboard-hero h2{font-size:30px;margin:4px 0 8px}.dashboard-quick-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.dashboard-kpis{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}.dashboard-kpis .kpi{text-decoration:none;transition:.15s ease}.dashboard-kpis .kpi:hover{transform:translateY(-2px);border-color:#b9cae1}.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}.section-head h2{margin-bottom:6px}.empty-state{border:1px dashed var(--line);background:#f8fafc;border-radius:18px;padding:20px}.empty-state p{margin-bottom:0}.news-list{display:grid;gap:12px}.news-item{display:grid;grid-template-columns:44px 1fr;gap:14px;align-items:start;border:1px solid var(--line);border-radius:18px;padding:16px;background:#fff;text-decoration:none;transition:.15s ease}.news-item:hover{border-color:#b9cae1;transform:translateY(-1px);box-shadow:0 8px 22px rgba(15,23,42,.07)}.news-marker{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;font-weight:900}.news-body strong{display:block;font-size:17px;margin:6px 0}.news-body p{margin:0;color:var(--muted);line-height:1.45}.news-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;color:var(--muted);font-size:13px}.news-knowledge .news-marker{background:#eaf1ff;color:#1d5fd1}.news-accounting .news-marker{background:#fff3d6;color:#9a5b00}.news-timeoff .news-marker{background:#e9f9ef;color:#166534}.news-default .news-marker{background:#f1f5f9;color:#334155}@media(max-width:800px){.dashboard-hero{display:block}.dashboard-quick-actions{justify-content:flex-start;margin-top:14px}.news-item{grid-template-columns:1fr}.news-marker{display:none}.topbar-title{align-items:flex-start}.topbar-logo{width:46px;height:46px}}


/* v11: Dashboard als Arbeitsübersicht */
.eyebrow{line-height:1.35;padding-top:1px;display:inline-block}
.dashboard-hero-clean{display:block;margin-bottom:22px;overflow:visible}
.dashboard-hero-clean h2{margin-top:6px}
.section-head h2{line-height:1.2}
.news-item.important{border-color:#f2c94c;background:#fffdf3}

/* v13: Dokumente & Aufgaben */
.form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-grid{display:grid;gap:14px}.form-grid.four{grid-template-columns:2fr 1fr 1fr auto}.field{display:grid;gap:7px}.field label{font-weight:800}.upload-layout{display:grid;grid-template-columns:minmax(580px,1.45fr) minmax(400px,.95fr);gap:22px;align-items:start}.upload-preview-card{position:sticky;top:24px}.upload-preview{width:100%;height:780px;border:1px solid var(--line);border-radius:18px;background:#f8fafc}.upload-preview-empty{height:780px;margin-top:16px;border:1px dashed var(--line);border-radius:18px;display:flex;align-items:center;justify-content:center;color:var(--muted);background:#f8fafc;text-align:center;padding:24px}.split-layout{display:grid;grid-template-columns:minmax(560px,1.45fr) minmax(380px,.9fr);gap:22px;align-items:start}.split-layout>.card:first-child{position:sticky;top:24px}hr{border:0;border-top:1px solid var(--line);margin:20px 0}.news-item{margin-bottom:10px}@media(max-width:1050px){.form-row,.form-grid.four,.upload-layout,.split-layout{grid-template-columns:1fr}.upload-preview-card,.split-layout>.card:first-child{position:static}.upload-preview,.upload-preview-empty{height:520px}}
.news-documents .news-marker{background:#ede9fe;color:#5b21b6}

/* v14: Übergabe / Drag-and-drop-Vorbereitung */
.handoff-hint{border:1px solid #f2c94c;background:#fffdf3;border-radius:18px;padding:14px 16px;line-height:1.45;color:#513c06}
.handoff-grid{display:grid;gap:14px}.handoff-card{display:grid;grid-template-columns:76px 1fr;gap:16px;border:1px solid var(--line);border-radius:20px;padding:16px;background:#fff}.handoff-icon{width:76px;height:76px;border-radius:18px;background:#eef3fb;color:var(--primary);display:grid;place-items:center;font-weight:900}.handoff-main{display:grid;gap:6px}.handoff-main span,.handoff-main small{color:var(--muted)}.handoff-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:8px}.handoff-actions form{display:inline-flex;margin:0}.handoff-path{font-size:12px;color:var(--muted);background:#f8fafc;border:1px solid var(--line);border-radius:12px;padding:8px 10px;margin-top:6px;word-break:break-all}@media(max-width:700px){.handoff-card{grid-template-columns:1fr}.handoff-icon{display:none}}

/* v41: System & Backup */
.data-table{width:100%;border-collapse:collapse;background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden}.data-table th,.data-table td{padding:12px 14px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}.data-table th{background:#f8fafc;color:var(--muted);font-size:13px;text-transform:uppercase;letter-spacing:.04em}.table-wrap{overflow:auto;border-radius:18px}.badge-warning{background:#fef3c7;color:#92400e}.badge-error{background:#fee2e2;color:#991b1b}.badge-info{background:#dbeafe;color:#1e40af}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:18px}.checkline{display:flex;align-items:center;gap:8px;margin:12px 0}.checkline input{width:auto}.clean-list{line-height:1.65}.clean-list li{margin-bottom:8px}.btn.small{min-height:32px;padding:6px 10px;border-radius:10px;font-size:13px}.btn.primary{background:var(--primary);color:#fff}.alert-info{border-color:#bfdbfe;background:#eff6ff;color:#1e3a8a}code{background:#f8fafc;border:1px solid var(--line);border-radius:8px;padding:2px 5px;white-space:pre-wrap}@media(max-width:900px){.grid.two{grid-template-columns:1fr}}
