:root {
  --sidebar-width: 230px;
  --brand: #4f46e5;
  --brand-2: #7c3aed;
}

body {
  background: #f4f5f9;
}

/* --- Sidebar --- */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%);
  color: #e0e7ff;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0;
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  padding: 0 1.25rem 1.25rem;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.sidebar-nav a, .sidebar-footer a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1.25rem;
  color: #c7d2fe;
  text-decoration: none;
  font-size: .92rem;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover, .sidebar-footer a:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}

.sidebar-nav a.active {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-left-color: #a5b4fc;
  font-weight: 600;
}

.sidebar-nav i, .sidebar-footer i {
  width: 1.1rem;
  text-align: center;
}

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: .75rem;
}

/* --- Main --- */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #6b7280;
  font-size: .9rem;
}

.content-area {
  padding: 1.75rem;
}

@media (max-width: 900px) {
  .sidebar { width: 64px; }
  .sidebar-brand span, .sidebar-nav span, .sidebar-footer span { display: none; }
  .main-content { margin-left: 64px; }
}

/* --- Stat cards (Dashboard-Kacheln) --- */
.stat-card {
  background: #fff;
  border-radius: .9rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  height: 100%;
}

.stat-card__icon {
  width: 42px; height: 42px;
  border-radius: .7rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  margin-bottom: .75rem;
  color: #fff;
}

.stat-card--indigo  .stat-card__icon { background: linear-gradient(135deg,#4f46e5,#6366f1); }
.stat-card--violet  .stat-card__icon { background: linear-gradient(135deg,#7c3aed,#a78bfa); }
.stat-card--emerald .stat-card__icon { background: linear-gradient(135deg,#059669,#10b981); }
.stat-card--amber   .stat-card__icon { background: linear-gradient(135deg,#d97706,#f59e0b); }

.stat-card__value { font-size: 1.5rem; font-weight: 700; }
.stat-card__label { color: #6b7280; font-size: .82rem; }

/* --- Kategorie-Badges --- */
.cat-badge {
  display: inline-flex; align-items: center;
  padding: .25rem .6rem;
  border-radius: .5rem;
  font-size: .78rem;
  font-weight: 600;
}

.color-dot {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block;
}

.donut-center-label {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

/* --- Detail-Seiten --- */
.detail-header {
  background: #fff;
  border-radius: .9rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.detail-icon {
  width: 48px; height: 48px;
  border-radius: .8rem;
  display: flex; align-items: center; justify-content: center;
}

.mini-stat {
  background: #fff;
  border-radius: .8rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  text-align: center;
}

.mini-stat__label { color: #6b7280; font-size: .78rem; }
.mini-stat__value { font-size: 1.25rem; font-weight: 700; }

/* --- Zeitstrahl --- */
.timeline { position: relative; padding-left: 1.5rem; }
.tl-item { position: relative; padding-bottom: 1.25rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -1.05rem; top: 1rem; bottom: -0.25rem;
  border-left: 2px dashed #e5e7eb;
}
.tl-item:last-child::before { display: none; }
.tl-dot { position: absolute; left: -1.35rem; top: .2rem; width: 12px; height: 12px; border-radius: 50%; }
.tl-title { font-weight: 600; font-size: .88rem; }
.tl-date { color: #6b7280; font-size: .82rem; }

/* --- Dokumente --- */
.doc-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 0;
  border-bottom: 1px solid #f1f2f6;
}
.doc-item:last-child { border-bottom: none; }
.doc-icon { font-size: 1.4rem; }
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-meta { color: #6b7280; font-size: .76rem; }
.doc-actions { display: flex; gap: .35rem; }
