:root {
  --ink: #1d2733; --muted: #5f6b78; --line: #d6dce2; --bg: #eef1f4; --card: #fff;
  --blue: #1f4e79; --green: #1e7a4c; --amber: #b86e00; --red: #b3261e;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.45;
}
body { margin: 0; }
a { color: var(--blue); }
.top { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center;
  background: var(--blue); color: #fff; padding: .6rem 1.25rem; }
.top a { color: #fff; text-decoration: none; opacity: .85; }
.top a:hover, .top a.active { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.brand { font-weight: 700; }
.top nav { display: flex; gap: 1rem; flex-wrap: wrap; flex: 1; }
.who { font-size: .9em; }
main { max-width: 1100px; margin: 0 auto; padding: 1.25rem; }
h1 { font-size: 1.5rem; margin: .5rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 1rem 1.25rem; margin-bottom: 1rem; }
.flash { padding: .6rem 1rem; border-radius: 4px; background: #e3f2e9; border-left: 4px solid var(--green); }
.flash.err { background: #fbe6e4; border-left-color: var(--red); }
table { border-collapse: collapse; width: 100%; background: var(--card); }
th, td { padding: .4rem .55rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f6f8fa; font-weight: 600; font-size: .9em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.weekend td { background: #f6f7f9; color: var(--muted); }
tr.today td { background: #fff8e6; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
.warn { color: var(--red); font-weight: 600; }
.muted { color: var(--muted); }
.neg { color: var(--red); } .pos { color: var(--green); }
form.inline { display: inline; }
label { display: block; margin: .5rem 0 .2rem; font-weight: 600; font-size: .9em; }
input, select, textarea { font: inherit; padding: .4rem .5rem; border: 1px solid #b9c2cb; border-radius: 4px; max-width: 100%; }
input:focus, select:focus, button:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.row > div { min-width: 140px; }
.check { display: inline-flex; gap: .3rem; align-items: center; font-weight: normal; margin-right: .6rem; }
button, .btn { font: inherit; cursor: pointer; border: 0; border-radius: 4px; padding: .45rem .9rem;
  background: var(--blue); color: #fff; text-decoration: none; display: inline-block; }
.btn.secondary, button.secondary { background: #dfe5eb; color: var(--ink); }
button.danger { background: var(--red); }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }

/* Stempeluhr */
.clock { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 1.5rem; text-align: center; margin-bottom: 1rem; }
.clock .time { font-size: 3.5rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.clock .status { font-size: 1.1rem; margin: .25rem 0 1.25rem; }
.status .dot { display: inline-block; width: .7em; height: .7em; border-radius: 50%; margin-right: .4em; vertical-align: middle; }
.st-anwesend .dot { background: var(--green); } .st-pause .dot { background: var(--amber); } .st-abwesend .dot { background: #9aa5b1; }
.stamp { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.stamp button { font-size: 1.15rem; padding: .9rem 1.8rem; min-width: 11rem; }
.stamp .kommen { background: var(--green); } .stamp .pause { background: var(--amber); } .stamp .gehen { background: var(--red); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: .8rem 1rem; }
.stats b { display: block; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.login { max-width: 360px; margin: 10vh auto; }
.login input { width: 100%; box-sizing: border-box; }

@media print {
  .top, .toolbar, .noprint { display: none !important; }
  body, :root { background: #fff; }
}
