@font-face { font-family: "Lato"; font-weight: 400; font-display: swap; src: url("fonts/lato-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-display: swap; src: url("fonts/lato-latin-700-normal.woff2") format("woff2"); }

:root {
  --red: #E30613; --blue: #005BD9; --ink: #16181D; --grey: #8A8A8A; --line: #E3E6EB; --bg: #F5F6F8; --card: #FFFFFF;
  --work: #1E9E5A; --pause: #E39B00; --out: #9AA0A8; --neg: #C62828; --pos: #1E7E4A;
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Lato", "Segoe UI", Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.45; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: .4rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 .8rem; }
h3 { font-size: 1rem; margin: 1.2rem 0 .5rem; }
code, .mono { font-family: ui-monospace, Consolas, monospace; }

.top { background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; padding-top: max(.6rem, env(safe-area-inset-top)); flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; min-height: 44px; }
.tenant-logo { max-height: 48px; max-width: 220px; display: block; }
.app-logo { height: 48px; }
.tenant-name { font-weight: 700; font-size: 1.15rem; }
.nav { display: flex; flex-wrap: wrap; gap: .25rem; }
.nav a { padding: .45rem .75rem; border-radius: 999px; color: var(--ink); font-weight: 700; font-size: .95rem; }
.nav a.on { background: var(--ink); color: #fff; }
.nav a:hover { text-decoration: none; background: var(--bg); }
.nav a.on:hover { background: var(--ink); }
.nav .logout { color: var(--grey); font-weight: 400; }
.adminbar { background: #FFF4D6; padding: .4rem 1rem; font-size: .9rem; }
.adminbar a { margin-left: .6rem; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.foot { text-align: center; padding: 1.5rem 1rem 2rem; opacity: .85; }
.foot img { height: 28px; }

.card { background: var(--card); border-radius: var(--r); padding: 1.1rem; margin: 0 0 1rem; box-shadow: 0 1px 2px rgba(0,0,0,.05); border: 1px solid var(--line); }
.muted { color: #6B7280; }
.small { font-size: .85rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.r { text-align: right; }
.neg { color: var(--neg); }
.pos { color: var(--pos); }

.flash { padding: .7rem .9rem; border-radius: 10px; margin: 0 0 1rem; background: #E7F6EC; border: 1px solid #BFE5CB; }
.flash.err { background: #FDECEC; border-color: #F5C2C2; }
.pwbox { font-size: 1.05rem; }

label { display: block; font-size: .9rem; font-weight: 700; margin: 0 0 .7rem; }
input, select, textarea { display: block; width: 100%; margin-top: .25rem; font: inherit; font-weight: 400; padding: .6rem .7rem; border: 1px solid #CBD1D9; border-radius: 10px; background: #fff; min-height: 44px; }
input:focus, select:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
label.check input { width: auto; min-height: 0; margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
.form-grid h2, .form-grid .wide, .form-grid button, .form-grid .row { grid-column: 1 / -1; }
@media (min-width: 720px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-grid button { justify-self: start; }
.row { display: flex; gap: .5rem; align-items: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 0; border-radius: 10px; padding: .65rem 1.1rem; font: inherit; font-weight: 700; cursor: pointer; background: #E9ECF0; color: var(--ink); min-height: 44px; text-decoration: none !important; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid #CBD1D9; }
.btn.danger { background: #FDECEC; color: var(--neg); }
.btn.small { padding: .35rem .7rem; min-height: 36px; font-size: .9rem; }
.btn.big { width: 100%; padding: .9rem; font-size: 1.05rem; }
.btn:active { transform: translateY(1px); }

/* Login */
.login { max-width: 420px; margin: 0 auto; }
.login-app { display: block; width: 140px; margin: 1rem auto 1.5rem; }

/* Stempeln */
.clockcard { background: #fff; border-radius: 22px; padding: 1.5rem 1.2rem; text-align: center; max-width: 520px; margin: 0 auto; border: 1px solid var(--line); }
.hello { font-size: 1.1rem; color: #6B7280; }
.now { font-size: 3.6rem; font-weight: 700; letter-spacing: .02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.datebig { color: #6B7280; margin-bottom: .8rem; }
.status { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; padding: .45rem .9rem; border-radius: 999px; background: var(--bg); margin-bottom: 1.2rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--out); display: inline-block; flex: none; }
.state-work .dot { background: var(--work); box-shadow: 0 0 0 4px rgba(30,158,90,.18); animation: pulse 2s infinite; }
.state-pause .dot { background: var(--pause); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(30,158,90,.08); } }
.actions { display: grid; gap: .8rem; margin-bottom: 1.3rem; }
.btn.huge { font-size: 1.25rem; padding: 1.25rem; border-radius: 16px; min-height: 68px; color: #fff; }
.btn.go { background: var(--work); }
.btn.warn { background: var(--pause); }
.btn.stop { background: var(--red); }
.stats, .kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.stats div, .kpis div { background: var(--bg); border-radius: 12px; padding: .6rem .7rem; text-align: left; }
.kpis div { background: #fff; border: 1px solid var(--line); }
.stats span, .kpis span { display: block; font-size: .8rem; color: #6B7280; }
.stats strong, .kpis strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(5, 1fr); } .stats { grid-template-columns: repeat(4, 1fr); } }
.kpis { margin-bottom: 1rem; }

/* Übersicht Inhaber */
.counters { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1rem; }
.counters .c { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .7rem; border-top: 4px solid var(--out); }
.counters .work { border-top-color: var(--work); }
.counters .pause { border-top-color: var(--pause); }
.counters strong { font-size: 1.8rem; display: block; line-height: 1; }
.counters span { color: #6B7280; font-size: .9rem; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .7rem; }
.person { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; align-items: center; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--out); border-radius: 12px; padding: .8rem .9rem; color: var(--ink); }
.person:hover { text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.person.state-work { border-left-color: var(--work); }
.person.state-pause { border-left-color: var(--pause); }
.person.state-out { opacity: .8; }
.pname { font-weight: 700; font-size: 1.05rem; }
.pstate, .ptime { grid-column: 2; font-size: .88rem; color: #6B7280; }
.warnline { grid-column: 1 / -1; color: var(--neg); font-size: .85rem; font-weight: 700; }
.headrow { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: .45rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .8rem; font-weight: 700; font-size: .9rem; }

/* Tabellen */
.tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 1rem; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: .5rem .65rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .93rem; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: #6B7280; background: #FAFBFC; white-space: nowrap; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 700; background: #FAFBFC; border-bottom: 0; }
tr.we td { background: #FAFBFC; color: #8A9099; }
tr.today td { background: #EEF4FF; }
tr.inactive td { color: var(--grey); }
.card table.list td { border-bottom: 1px solid var(--line); }
.tag { display: inline-block; font-size: .78rem; padding: .1rem .45rem; border-radius: 6px; background: #EEF0F3; margin-left: .3rem; font-weight: 700; white-space: nowrap; }
.tag.abs { background: #E8F0FF; color: #0B4AA8; margin-left: 0; }
.tag.hol { background: #FFF1E0; color: #8A4B00; }
.thumb { max-height: 34px; max-width: 110px; display: block; }

.monthnav { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.monthnav strong { min-width: 150px; text-align: center; font-size: 1.1rem; }

.entryrow { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; padding: .6rem 0; border-bottom: 1px dashed var(--line); }
.entryrow label { margin: 0; min-width: 110px; }
.entryrow label.grow { flex: 1 1 220px; }
.entryrow .btn { margin-bottom: 2px; }
.inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .8rem; }
.inline label { margin: 0; }
.inline p { flex-basis: 100%; margin: 0; }
.inline-form { display: inline-flex; gap: .3rem; }
.linkbox .copyrow { display: flex; gap: .5rem; margin-top: .4rem; }
.linkbox input { margin: 0; }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .2rem 1rem; margin: .6rem 0 1rem; }
.checklist label { margin: 0; }
details summary { cursor: pointer; font-weight: 700; color: var(--blue); margin-top: 1rem; }
.logo-preview { display: flex; align-items: center; gap: 1rem; margin-bottom: .7rem; }
.logo-preview img { max-height: 60px; max-width: 240px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: #fff; }

@media (max-width: 600px) {
  .top { justify-content: center; }
  .nav { justify-content: center; }
  .wrap { padding: .8rem; }
  .now { font-size: 3rem; }
  table.month thead th:nth-child(3), table.month tbody td:nth-child(3), table.month tfoot td:nth-child(2) { display: none; }
}
@media print {
  .top .nav, .foot, .monthnav .btn, form, .adminbar { display: none !important; }
  body { background: #fff; }
}
