:root {
  --blue: #3044B5;
  --blue-dark: #0656A1;
  --yellow: #FFEE00;
  --grey: #f2f2f5;
  --text: #1a1a2e;
  --border: #dcdce6;
}
* { box-sizing: border-box; }
body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  background: var(--grey);
  color: var(--text);
}
header.topbar {
  background: var(--blue);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header.topbar a.brand {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
}
nav.tabs {
  background: var(--blue-dark);
  display: flex;
  flex-wrap: wrap;
}
nav.tabs a {
  color: #fff;
  text-decoration: none;
  padding: 10px 18px;
  font-size: 0.92rem;
}
nav.tabs a.active, nav.tabs a:hover {
  background: var(--blue);
  border-bottom: 3px solid var(--yellow);
}
main {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 20px 60px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 20px;
}
h1 { font-size: 1.4rem; margin-top: 0; }
h2 { font-size: 1.15rem; color: var(--blue); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
th { background: var(--grey); }
tr:hover td { background: #fafaff; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
form.inline { display: inline; }
label { display: block; font-size: 0.85rem; margin: 10px 0 4px; font-weight: bold; }
input[type=text], input[type=number], input[type=date], input[type=password], select, textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.95rem;
}
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 160px; }
button, .btn {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-block;
  margin-top: 14px;
}
button:hover, .btn:hover { background: var(--blue-dark); }
.btn.secondary { background: #888; }
.btn.danger { background: #c0392b; }
.btn.yellow { background: var(--yellow); color: var(--text); font-weight: bold; }
.flash {
  background: #e3f7e3;
  border: 1px solid #8fd18f;
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.flash.error {
  background: #fde3e3;
  border-color: #e08888;
}
.result-table td:first-child { font-weight: normal; }
.result-table tr.total td { font-weight: bold; border-top: 2px solid var(--blue); }
.result-table tr.saldo td { font-weight: bold; background: var(--grey); font-size: 1.05rem; }
.login-wrap {
  max-width: 360px;
  margin: 80px auto;
}
.small { font-size: 0.8rem; color: #666; }
.actions a { margin-right: 8px; font-size: 0.85rem; }

/* ---- Jahr-Switcher ---- */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}
.year-label { color: #ccc; }
.year-switcher {
  display: flex;
  gap: 4px;
}
.year-btn {
  color: #ccc;
  text-decoration: none;
  padding: 3px 9px;
  border-radius: 3px;
  border: 1px solid transparent;
  font-size: 0.88rem;
}
.year-btn:hover { border-color: #fff; color: #fff; }
.year-btn.active {
  background: var(--yellow);
  color: var(--text);
  font-weight: bold;
  border-color: var(--yellow);
}
.topbar-sep { color: #555; }
.topbar-logout { color: #ccc; }
.topbar-logout:hover { color: #fff; }
