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

:root {
  --bg:         #0f0f13;
  --surface:    #1a1a24;
  --border:     #2a2a3a;
  --accent:     #818cf8;
  --accent2:    #a78bfa;
  --text:       #f9fafb;
  --text-muted: #6b7280;
  --green:      #22c55e;
  --yellow:     #eab308;
  --red:        #ef4444;
  --sidebar-w:  60px;
  --sidebar-w-open: 200px;
}

html, body { height: 100%; background: var(--bg); color: var(--text); font-family: system-ui, sans-serif; font-size: 14px; }

/* ── Layout ── */
#app { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; transition: width .2s; overflow: hidden; flex-shrink: 0; }
.sidebar.open { width: var(--sidebar-w-open); }
.main-content { flex: 1; overflow-y: auto; padding: 24px; }

/* ── Sidebar ── */
.sidebar-logo { height: 52px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent); font-size: 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.sidebar-logo .full-name { display: none; margin-left: 8px; white-space: nowrap; }
.sidebar.open .sidebar-logo .full-name { display: inline; }
.nav-items { display: flex; flex-direction: column; gap: 4px; padding: 8px; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 6px; cursor: pointer; color: var(--text-muted); text-decoration: none; transition: background .15s, color .15s; white-space: nowrap; }
.nav-item:hover, .nav-item.active { background: rgba(129,140,248,.12); color: var(--accent); }
.nav-item .icon { font-size: 18px; flex-shrink: 0; width: 20px; text-align: center; }
.nav-item .label { display: none; font-size: 13px; font-weight: 500; }
.sidebar.open .nav-item .label { display: inline; }
.nav-bottom { padding: 8px; border-top: 1px solid var(--border); }

/* ── Cards ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }

/* ── Progress bar ── */
.progress-bar { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 99px; transition: width .4s; }

/* ── Traffic light ── */
.ampel { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.ampel-dot { width: 12px; height: 12px; border-radius: 50%; }
.ampel-dot.erfuellt, .ampel-dot.gruen { background: var(--green); box-shadow: 0 0 8px var(--green); }
.ampel-dot.gelb { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.ampel-dot.rot { background: var(--red); box-shadow: 0 0 8px var(--red); }

/* ── Forms ── */
label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
input, select { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; color: var(--text); font-size: 14px; outline: none; }
input:focus, select:focus { border-color: var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; border-radius: 6px; border: none; cursor: pointer; font-size: 13px; font-weight: 500; transition: opacity .15s; }
.btn:hover { opacity: .85; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-danger { background: rgba(239,68,68,.15); border: 1px solid var(--red); color: var(--red); }

/* ── Badges ── */
.badge { display: inline-block; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.badge-green { background: rgba(34,197,94,.15); color: #4ade80; }
.badge-yellow { background: rgba(234,179,8,.15); color: #fbbf24; }
.badge-red { background: rgba(239,68,68,.15); color: #f87171; }
.badge-blue { background: rgba(129,140,248,.15); color: var(--accent); }

/* ── Planner rows ── */
.planner-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--border); margin-bottom: 4px; cursor: pointer; transition: border-color .15s; }
.planner-row:hover { border-color: var(--accent); }
.planner-row.routine { background: var(--surface); }
.planner-row.exception-Vacation { background: rgba(234,179,8,.06); border-color: rgba(234,179,8,.3); }
.planner-row.exception-Sick { background: rgba(239,68,68,.06); border-color: rgba(239,68,68,.3); }
.planner-row.exception-Gleittag { background: rgba(129,140,248,.06); border-color: rgba(129,140,248,.3); }
.planner-row.exception-Holiday { background: rgba(107,114,128,.06); border-color: rgba(107,114,128,.3); }
.planner-row.suggestion { border-style: dashed; border-color: var(--accent2); background: rgba(167,139,250,.04); }
.planner-row.weekend, .planner-row.holiday { opacity: .35; cursor: default; }

/* ── Headings ── */
h1 { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
h2 { font-size: 16px; font-weight: 600; margin-bottom: 12px; color: var(--text-muted); }
.section-gap { margin-bottom: 24px; }

/* ── Misc ── */
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-green { color: #4ade80; }
.text-red { color: #f87171; }
.text-yellow { color: #fbbf24; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
th { color: var(--text-muted); font-weight: 500; }

/* ── Mobile ── */
@media (max-width: 640px) {
  .main-content { padding: 16px; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 100; transform: translateX(-100%); width: var(--sidebar-w-open) !important; transition: transform .2s; }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 99; }
  .sidebar-overlay.visible { display: block; }
  .hamburger { display: flex; }
}
@media (min-width: 641px) {
  .hamburger { display: none; }
  .sidebar-overlay { display: none !important; }
}
