:root {
  --blue: #1b2380; --orange: #da5003; --ink: #11151f; --muted: #6b7280;
  --line: #e5e7eb; --bg: #f5f6fa; --card: #ffffff;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; background: var(--bg); color: var(--ink); font-size: 14px; }
.topbar { display: flex; align-items: center; gap: 28px; background: var(--blue); color: #fff; padding: 10px 24px; }
.topbar .logo { height: 30px; }
.topbar nav { display: flex; gap: 4px; flex: 1; }
.topbar a { color: #cdd2f2; text-decoration: none; padding: 7px 14px; border-radius: 6px; font-weight: 600; }
.topbar a.active, .topbar a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.topbar-note { font-size: 11px; color: #8b93d6; }
main { max-width: none; margin: 24px 0 64px; padding: 0 28px; }

.chips { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.chip { text-decoration: none; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 5px 13px; border-radius: 99px; font-size: 12.5px; font-weight: 600; }
.chip.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.chip span { opacity: 0.65; font-weight: 400; }
.chip.status-entwurf { background: #eef0f4; color: #4b5563; border-color: #d7dbe3; }
.chip.status-offen { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.chip.status-erinnert { background: #ffedd5; color: #9a3412; border-color: #fed7aa; }
.chip.status-gemahnt { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.chip.status-bezahlt { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.chip.status-storniert { background: #e5e7eb; color: #374151; border-color: #d1d5db; }
.chip.status-entwurf.active { background: #4b5563; color: #fff; border-color: #4b5563; }
.chip.status-offen.active { background: #92400e; color: #fff; border-color: #92400e; }
.chip.status-erinnert.active { background: #9a3412; color: #fff; border-color: #9a3412; }
.chip.status-gemahnt.active { background: #991b1b; color: #fff; border-color: #991b1b; }
.chip.status-bezahlt.active { background: #065f46; color: #fff; border-color: #065f46; }
.chip.status-storniert.active { background: #374151; color: #fff; border-color: #374151; }
.tag { background: var(--orange); color: #fff; border-radius: 4px; font-size: 10px; font-weight: 800; padding: 1px 5px; margin-left: 4px; vertical-align: middle; }
.lock { font-size: 12px; color: var(--muted); margin-left: 10px; vertical-align: middle; }
.lifecycle { display: flex; align-items: center; gap: 16px; justify-content: space-between; }
table.editor { margin-top: 4px; }
table.editor input { border-radius: 5px; padding: 6px 8px; }
table.editor input[name=act_stunden], table.editor input[name=pos_menge],
table.editor input[name=pos_preis] { text-align: right; }
table.editor td { border-bottom: 1px solid var(--line); }
table.editor tr:first-child th { padding-top: 10px; padding-bottom: 10px; }
table.editor input.subinput { margin-top: 3px; font-size: 12px; color: var(--muted); }
table.editor td { padding: 5px 8px; }
th.sorted-asc::after { content: " ▲"; font-size: 9px; }
th.sorted-desc::after { content: " ▼"; font-size: 9px; }
fieldset[disabled] input, fieldset[disabled] select, fieldset[disabled] textarea { background: #f3f4f6; color: var(--muted); }
h1 { font-size: 22px; color: var(--blue); margin: 4px 0 18px; }
h1 .accent { color: var(--orange); }
h2 { font-size: 15px; color: var(--blue); margin: 26px 0 10px; }
.flash { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; padding: 9px 14px; border-radius: 8px; margin-bottom: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 18px; }
table.list { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
table.list th { background: var(--blue); color: #fff; text-align: left; padding: 9px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
table.list td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
td.num, th.num, table.list th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
a { color: var(--blue); }
.btn { display: inline-block; background: var(--blue); color: #fff; border: 0; border-radius: 7px; padding: 8px 16px; font-weight: 600; cursor: pointer; text-decoration: none; font-size: 13px; }
.btn.orange { background: var(--orange); }
.btn.ghost { background: transparent; color: var(--blue); border: 1px solid var(--line); }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn.danger { background: #b91c1c; }
form.inline { display: inline; }
label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 12px 0 4px; font-weight: 700; }
input[type=text], input[type=date], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px;
  font: inherit; background: #fff;
}
textarea.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.6; }
textarea { resize: vertical; min-height: 72px; line-height: 1.55; overflow-y: hidden; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 24px; }
.status { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; }
.status.offen { background: #fef3c7; color: #92400e; }
.status.erinnert { background: #ffedd5; color: #9a3412; }
.status.gemahnt { background: #fee2e2; color: #991b1b; }
.status.bezahlt { background: #d1fae5; color: #065f46; }
.status.storniert { background: #e5e7eb; color: #374151; }
.overdue { color: #b91c1c; font-weight: 700; }
.muted { color: var(--muted); }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.kpi { display: inline-block; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px; font-size: 13px; }
.kpi strong { color: var(--orange); }
select.statusquick { width: auto; padding: 3px 6px; font-size: 12px; }
.help { font-size: 12px; color: var(--muted); margin-top: 4px; }
