:root {
  --zhaw-primary: #002C59;
  --zhaw-accent: #6FBAED;
  --zhaw-yellow: #F5C513;
  --bg: #F4F6F9;
  --card-bg: #FFFFFF;
  --text: #1F2A3A;
  --text-muted: #6B7280;
  --border: #E5E7EB;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.header {
  background: var(--zhaw-primary);
  color: white;
  border-bottom: 6px solid var(--zhaw-yellow);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 4px 0 0 0;
  color: var(--zhaw-accent);
  font-size: 0.95rem;
}

.header-accent {
  width: 60px;
  height: 60px;
  background: var(--zhaw-accent);
  border-radius: 4px;
}

.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 32px 60px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.kpi {
  background: var(--card-bg);
  border-left: 4px solid var(--zhaw-accent);
  padding: 16px 18px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.kpi-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--zhaw-primary);
  line-height: 1.1;
}

.kpi-label {
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.chart-card {
  background: var(--card-bg);
  padding: 18px 20px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.chart-card h2 {
  margin: 0 0 12px 0;
  font-size: 1rem;
  color: var(--zhaw-primary);
  font-weight: 700;
}

.chart-card canvas {
  max-height: 240px;
}

.table-section {
  background: var(--card-bg);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  padding: 18px 20px;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 14px;
  flex-wrap: wrap;
}

.table-header h2 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--zhaw-primary);
}

#search {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.9rem;
  min-width: 280px;
}

#search:focus {
  outline: 2px solid var(--zhaw-accent);
  outline-offset: -1px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead th {
  background: var(--zhaw-primary);
  color: white;
  text-align: left;
  padding: 10px 8px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  position: sticky;
  top: 0;
}

thead th:hover {
  background: #003A75;
}

thead th.sort-asc::after { content: ' ▲'; font-size: 0.75em; }
thead th.sort-desc::after { content: ' ▼'; font-size: 0.75em; }

tbody td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tbody tr:hover {
  background: #F9FAFB;
}

tbody tr:nth-child(even) {
  background: #FAFBFC;
}

tbody tr:nth-child(even):hover {
  background: #F1F4F8;
}

.footer {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 32px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
