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

:root {
  --nav: #1a1f2e;
  --nav-border: #2d3347;
  --accent: #c9a84c;
  --accent-hover: #e8c96a;
  --bg: #ffffff;
  --surface: #f5f5f3;
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e5e3;
  --danger: #dc2626;
  --success: #16a34a;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

.shell { display: flex; height: 100vh; }

/* Sidebar */
.sidebar { width: 220px; background: var(--nav); display: flex; flex-direction: column; flex-shrink: 0; }
.logo { padding: 20px 20px 16px; border-bottom: 1px solid var(--nav-border); }
.logo-mark { font-size: 11px; letter-spacing: 0.12em; color: var(--accent); text-transform: uppercase; font-weight: 500; }
.logo-name { font-size: 20px; font-weight: 600; color: #fff; margin-top: 2px; }
.nav-section { padding: 12px 0; border-bottom: 1px solid var(--nav-border); }
.nav-label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #5a6080; padding: 0 16px; margin-bottom: 4px; font-weight: 500; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 13.5px; color: #8a90a8; cursor: pointer; border-left: 2px solid transparent; text-decoration: none; }
.nav-item:hover { color: #c8ccd8; background: rgba(255,255,255,0.04); }
.nav-item.active { color: var(--accent); border-left-color: var(--accent); background: rgba(201,168,76,0.08); }
.nav-bottom { margin-top: auto; padding: 12px 16px; border-top: 1px solid var(--nav-border); }
.user-pill { display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: rgba(201,168,76,0.2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; color: var(--accent); flex-shrink: 0; }
.user-name { font-size: 13px; color: #c8ccd8; font-weight: 500; }
.user-role { font-size: 11px; color: #5a6080; }

/* Main */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar { padding: 16px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.page-title { font-size: 16px; font-weight: 500; }
.topbar-actions { display: flex; gap: 8px; }
.content { padding: 24px; overflow-y: auto; flex: 1; }

/* Buttons */
.btn { border-radius: 8px; padding: 7px 16px; font-size: 13px; font-weight: 500; cursor: pointer; border: none; }
.btn-primary { background: var(--accent); color: #1a1f2e; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface); }
.btn-danger { background: var(--danger); color: white; }

/* Metrics */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.metric { background: var(--surface); border-radius: 8px; padding: 14px 16px; }
.metric-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }
.metric-value { font-size: 24px; font-weight: 500; margin-top: 4px; }
.metric-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.accent { color: var(--accent); }

/* Cards */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-title { font-size: 13px; font-weight: 500; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; padding: 10px 12px; font-size: 11px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); }
td { padding: 12px 12px; border-bottom: 1px solid var(--border); color: var(--text); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface); }

/* Badges */
.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 99px; font-weight: 500; }
.badge-offen { background: #fef3c7; color: #92400e; }
.badge-erledigt { background: #d1fae5; color: #065f46; }
.badge-cb { background: #ede9fe; color: #4c1d95; }
.badge-fuchs { background: #fef3c7; color: #92400e; }
.badge-iacb { background: #dbeafe; color: #1e3a5f; }
.badge-ah { background: #f3f4f6; color: #374151; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: var(--bg); border-radius: 12px; padding: 24px; width: 480px; max-width: 90vw; }
.modal-title { font-size: 15px; font-weight: 500; margin-bottom: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* Forms */
.form-group { margin-bottom: 14px; }
label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
input, select, textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13.5px; color: var(--text); background: var(--bg); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[type="checkbox"] { width: auto; padding: 0; flex-shrink: 0; }
textarea { resize: vertical; min-height: 80px; }

/* Empty state */
.empty { text-align: center; padding: 48px; color: var(--muted); font-size: 14px; }

/* Dashboard task/event items */
.task-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.task-item:last-child { border-bottom: none; }
.task-check { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--border); flex-shrink: 0; margin-top: 2px; }
.task-title { font-size: 13px; }
.task-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.event-item { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.event-item:last-child { border-bottom: none; }
.event-date { width: 36px; text-align: center; flex-shrink: 0; }
.event-day { font-size: 18px; font-weight: 500; color: var(--accent); line-height: 1; }
.event-month { font-size: 10px; color: var(--muted); text-transform: uppercase; }
.event-title { font-size: 13px; font-weight: 500; }
.event-type { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Strichliste */
.strich-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.strich-card { background: var(--surface); border-radius: 10px; padding: 14px 16px; }
.strich-name { font-size: 14px; font-weight: 500; margin-bottom: 10px; }
.strich-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.strich-btns { display: flex; gap: 4px; }
.strich-btn { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.strich-count { font-weight: 500; min-width: 20px; text-align: center; }
.strich-summe { font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }

/* Buttons */
.btn-secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--border); }

/* Pauken progress bar */
.pauken-bar { flex: 1; max-width: 80px; height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.pauken-fill { height: 100%; background: var(--accent); border-radius: 99px; }
