:root { --ink:#18212b; --muted:#66788a; --line:#e3e8ee; --bg:#f4f6f9; --accent:#1f5fae; --green:#18794e; --green-bg:#e6f4ec;
        --red:#b42318; --red-bg:#fdecea; --amber:#9a6200; --amber-bg:#fdf3dc; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 20px; margin: 0 0 14px; } h2 { font-size: 16px; margin: 28px 0 10px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; white-space: nowrap; }
.bar { background: var(--ink); color: #fff; }
.bar-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; height: 52px; display: flex; align-items: center; gap: 10px; }
.brand { color: #fff; font-weight: 700; } .brand:hover { text-decoration: none; }
.bar-user { margin-left: auto; color: #aab7c4; font-size: 12px; } .bar-user a { color: #fff; }
main { max-width: 1200px; margin: 0 auto; padding: 22px 20px 60px; }
.box { background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.empty { padding: 26px; text-align: center; color: var(--muted); }
.login { max-width: 360px; margin: 10vh auto; padding: 26px; text-align: center; }
.tag { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--line); color: var(--ink); }
.tag-green { background: var(--green-bg); color: var(--green); } .tag-blue { background: #e8f0fa; color: var(--accent); }
.tag-amber { background: var(--amber-bg); color: var(--amber); }
.btn { display: inline-flex; align-items: center; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 8px 16px;
       border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #b8c4d0; text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.msg { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.msg-ok { background: var(--green-bg); color: var(--green); } .msg-error { background: var(--red-bg); color: var(--red); }
.msg-warn { background: var(--amber-bg); color: var(--amber); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.card { display: block; padding: 16px; color: inherit; } .card:hover { border-color: var(--accent); text-decoration: none; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 16px; }
.card-nums { display: flex; justify-content: space-between; margin: 12px 0 4px; font-size: 15px; }
.back { display: inline-block; margin-bottom: 10px; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.head h1 { margin: 0; }
.totals { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 40px; padding: 14px 18px; margin-bottom: 12px; }
.totals .group { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.totals label { display: block; font-size: 12px; color: var(--muted); } .totals b { font-size: 16px; white-space: nowrap; }
.totals .month b { font-size: 14px; color: var(--muted); }
.tools { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; }
input[type=search] { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; min-width: 240px; }
input[type=checkbox] { width: 17px; height: 17px; cursor: pointer; }
.table-wrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; }
table.data th, table.data td { text-align: left; padding: 9px 12px; border-top: 1px solid #eef2f6; vertical-align: top; }
table.data thead th { font-size: 12px; color: var(--muted); font-weight: 600; background: #fafbfc; border-top: none; white-space: nowrap; }
table.data .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.data .check { width: 36px; }
.btn-sm { padding: 4px 12px; font-size: 12px; }
.who { color: var(--muted); min-width: 150px; } .err { color: var(--amber); }
.act { text-align: right; width: 1%; }
.count { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--line); color: var(--ink); }
tr.moved { animation: flash 1.2s ease-out; } @keyframes flash { from { background: #fff3c4; } to { background: transparent; } }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line);
         font-size: 13px; color: var(--muted); }
.pager .btn { padding: 4px 10px; font-size: 12px; }
@media (max-width: 760px) {
  main { padding: 16px 12px 40px; }
  .bar-inner { padding: 0 12px; }
  input[type=search] { min-width: 0; width: 100%; }
  .tools, .actions { width: 100%; } .actions .btn { flex: 1; justify-content: center; }
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr { border-top: 1px solid var(--line); padding: 6px 0; position: relative; }
  table.data td { border: none; padding: 3px 12px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  table.data td::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; }
  table.data td[data-label=""]::before { content: none; }
  table.data td.kunde { display: block; text-align: left; }
  table.data td.who, table.data td.act { text-align: left; }
}
.btn.loading { gap: 6px; cursor: wait; }
.spin { width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
        display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
tr.busy td { opacity: .55; }
