* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f5f7;
  color: #1d1d1f;
  margin: 0;
  padding: 0;
}
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
header h1 { margin: 0; }
.inline {
  display: flex;
  gap: .75rem;
  align-items: center;
}
.card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
form { display: flex; flex-direction: column; gap: 1rem; }
label { display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; }
input {
  padding: .6rem .75rem;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
}
button {
  padding: .7rem 1.2rem;
  border: none;
  background: #0071e3;
  color: white;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
}
button:hover { background: #0077ed; }
button.link {
  background: none;
  color: #0071e3;
  padding: 0;
}
.error {
  background: #fde7e7;
  color: #b50000;
  padding: .6rem .8rem;
  border-radius: 6px;
}

.row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.row h2 { margin: 0; }
.muted { color: #86868b; }
.flash { background: #e7f5e9; border: 1px solid #b6dfb5; color: #1b5e20; padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: .55rem .5rem; text-align: left; border-bottom: 1px solid #f0f0f3; vertical-align: top; }
th { font-weight: 600; color: #6e6e73; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
td code { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; color: #424245; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.num.neg { color: #c5283d; }
.zweck { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

nav { display: flex; gap: 1rem; align-items: center; }
nav a { color: #0071e3; text-decoration: none; font-size: .95rem; }
nav a:hover { text-decoration: underline; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; align-items: end; }
.filters .grow { grid-column: span 2; }
.filters label { font-size: .8rem; }
.btn-link { padding: .7rem 0; color: #6e6e73; text-decoration: none; align-self: end; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #f0f0f3; }
.pager a { color: #0071e3; text-decoration: none; }
.small { font-size: .82rem; }

/* Kategorien */
.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
.cat-badge.sub { opacity: .9; }
.sub-row td { padding-left: 1.5rem; background: #fafafa; }
.danger { color: #c5283d !important; }
.cat-form { display: inline-flex; align-items: center; gap: .3rem; }
.cat-select {
  font-size: .8rem;
  padding: .2rem .4rem;
  border: 1px solid #d2d2d7;
  border-radius: 6px;
  background: #fff;
  max-width: 140px;
}
.lock-icon { font-size: .75rem; }
select { padding: .6rem .75rem; border: 1px solid #d2d2d7; border-radius: 8px; font-size: 1rem; background: #fff; }
.form-inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.form-inline label { flex-direction: column; }
h3 { font-size: 1rem; font-weight: 600; margin: 0 0 .5rem; }
