@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("vendor/fonts/inter-latin-wght-normal.woff2") format("woff2");
}

:root {
  --bg: #0e1113;
  --panel: #14181b;
  --panel2: #191e22;
  --line: #242b30;
  --line2: #303940;
  --text: #e9edef;
  --muted: #8b969d;
  --faint: #5d686f;
  --accent: #7fd6b2;
  --accent-ink: #08130f;
  --minus: #e0938a;
  --radius: 12px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Inter", system-ui, sans-serif;
  font-feature-settings: "tnum", "cv11";
  -webkit-font-smoothing: antialiased;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }

/* Kopf */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 3vw, 40px);
  background: rgba(14, 17, 19, 0.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }
.mark { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.topright { display: flex; align-items: center; gap: 10px; min-width: 0; }
.status { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Bedienelemente */
.btn, select, input {
  font: inherit; color: var(--text);
  background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px;
}
.btn { padding: 8px 14px; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s; }
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.ghost { background: transparent; }
.btn.danger { background: transparent; color: var(--minus); margin-left: auto; }
.btn.icon { width: 38px; padding: 6px 0; font-size: 20px; line-height: 1; }
.btn.x { background: transparent; border-color: transparent; color: var(--faint); padding: 4px 8px; font-size: 18px; line-height: 1; }
.btn.x:hover { color: var(--text); }
.btn.link { background: none; border: 0; padding: 4px 0; color: var(--accent); font-size: 13px; text-align: left; white-space: normal; }
.btn.add { background: transparent; border: 0; color: var(--faint); padding: 2px 0; font-size: 13px; justify-self: start; }
.btn.add:hover { color: var(--accent); }
select { padding: 8px 10px; max-width: 100%; }
input { padding: 8px 10px; width: 100%; min-width: 0; }
input::placeholder { color: var(--faint); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input:focus-visible, select:focus-visible { outline-offset: -1px; border-color: var(--accent); }

main { padding: clamp(16px, 2.4vw, 32px) clamp(16px, 3vw, 40px) 48px; }

/* Wochenkopf */
.weekbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.weeknav { display: flex; align-items: center; gap: 10px; }
.weektitle { display: flex; flex-direction: column; min-width: 190px; text-align: center; }
.kw { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
.range { color: var(--muted); font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; flex: 1; max-width: 860px; }
.tile { display: flex; flex-direction: column; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.tl { color: var(--muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.tv { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.ts { color: var(--faint); font-size: 12px; }
.plus { color: var(--accent); }
.minus { color: var(--minus); }

/* Raster */
.grid { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ghead, .day, .gfoot { display: grid; grid-template-columns: 170px minmax(0, 1fr) 200px 240px; column-gap: 20px; padding: 0 20px; }
.ghead {
  padding-top: 12px; padding-bottom: 12px; align-items: center;
  color: var(--muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.ghead .block span { text-align: center; }
.ghead .block .left { text-align: left; padding-left: 11px; }
.ghead .sums { padding-top: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.day { padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); align-items: start; }
.day.weekend { background: rgba(255, 255, 255, 0.012); }
.day.weekend .dname { color: var(--muted); }
.day.today { box-shadow: inset 3px 0 0 var(--accent); }
.dlabel { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding-top: 8px; }
.dname { font-weight: 600; }
.dname .short { display: none; }
.ddate { color: var(--muted); font-size: 13px; }
.tag { flex-basis: 100%; font-size: 12px; color: var(--accent); }
.tag.muted { color: var(--faint); }
.blocks { display: grid; gap: 6px; }
.block { display: grid; grid-template-columns: 82px 82px 66px minmax(0, 1fr) 34px; gap: 10px; align-items: center; }
.block .f { background: transparent; border-color: transparent; }
.block .f:hover { border-color: var(--line2); }
.block .f:focus { background: var(--panel2); }
.block .f-start, .block .f-end, .block .f-pause { text-align: center; background: var(--panel2); border-color: var(--line); }
.block.invalid .f-start, .block.invalid .f-end, .block.invalid .f-pause, .f.bad { border-color: var(--minus) !important; }
.block .x { opacity: 0; }
.block:hover .x, .block:focus-within .x { opacity: 1; }
.absence { display: grid; gap: 6px; }
.absence select { width: 100%; background: transparent; border-color: var(--line); color: var(--muted); }
.day.absent .absence select { color: var(--text); border-color: var(--line2); background: var(--panel2); }
.sums { display: grid; grid-template-columns: repeat(3, 80px); padding-top: 8px; }
.sums .soll { color: var(--muted); }
.sums .ist { font-weight: 600; }
.gfoot { grid-template-columns: minmax(0, 1fr) 80px 80px 80px; column-gap: 0; padding-top: 14px; padding-bottom: 14px; font-weight: 650; background: var(--panel2); }
.flabel { color: var(--muted); font-weight: 500; }
.keys { margin: 16px 2px 0; color: var(--faint); font-size: 12.5px; line-height: 2; }
kbd { font: inherit; font-size: 11.5px; padding: 2px 6px; margin: 0 2px 0 12px; border: 1px solid var(--line2); border-radius: 5px; color: var(--muted); }
kbd:first-child { margin-left: 0; }
kbd + kbd { margin-left: 0; }

/* Leerer Start */
.welcome { max-width: 560px; margin: 12vh auto 0; text-align: center; }
.welcome h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.03em; margin-bottom: 14px; }
.welcome p { color: var(--muted); margin: 0 0 24px; }
.hint { color: var(--faint); font-size: 13px; }
.welcome .hint { margin-top: 24px; }

/* Dialog */
dialog { width: min(920px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; color: var(--text); background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; }
dialog::backdrop { background: rgba(5, 7, 8, 0.7); backdrop-filter: blur(3px); }
.dhead { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.dhead h2 { font-size: 18px; }
.dbody { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px; padding: 24px; }
.dcol h3 { font-size: 14px; margin: 0 0 10px; }
.dcol ul + h3 { margin-top: 28px; }
.people, .hlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.person { width: 100%; text-align: left; display: flex; flex-direction: column; padding: 10px 14px; font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.person:hover { border-color: var(--line2); }
.person.active { border-color: var(--accent); }
.pn { font-weight: 600; }
.pm { color: var(--muted); font-size: 13px; }
.empty { color: var(--faint); font-size: 13px; }
.hlist li:not(.empty) { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; font-size: 14px; }
.hform { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; margin-top: 10px; }
.form { display: grid; gap: 14px; align-content: start; }
.form label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; align-content: end; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.error { min-height: 20px; margin: 0; color: var(--minus); font-size: 13px; }
.actions { display: flex; gap: 10px; }

/* Schmal */
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(2, 1fr); max-width: none; flex-basis: 100%; }
  .ghead { display: none; }
  .day { grid-template-columns: minmax(0, 1fr) auto; row-gap: 10px; padding: 14px 16px; }
  .dlabel { padding-top: 0; }
  .tag { flex-basis: auto; }
  .sums { grid-column: 2; grid-row: 1; grid-template-columns: repeat(3, auto); gap: 12px; padding-top: 0; font-size: 14px; }
  .blocks, .absence { grid-column: 1 / -1; }
  .absence { grid-template-columns: 1fr 1fr; }
  .gfoot { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 640px) {
  .weekbar { gap: 14px; }
  .weeknav { width: 100%; }
  .weektitle { flex: 1; min-width: 0; }
  .tiles { gap: 8px; }
  .tile { padding: 10px 12px; }
  .tv { font-size: 19px; }
  .dname .long { display: none; }
  .dname .short { display: inline; }
  .block { grid-template-columns: 1fr 1fr 1fr 30px; gap: 6px; }
  .block .f-note { grid-column: 1 / 4; grid-row: 2; background: var(--panel2); border-color: var(--line); }
  .block .x { opacity: 1; }
  .gfoot { grid-template-columns: minmax(0, 1fr) auto auto auto; column-gap: 12px; }
  .keys { display: none; }
  .status { display: none; }
  .top { gap: 10px; }
  .topright { flex: 1; justify-content: flex-end; gap: 8px; }
  #employeeSelect { flex: 0 1 140px; min-width: 0; width: 100%; }
  .top .btn { padding: 8px 10px; }
  .dbody { grid-template-columns: 1fr; padding: 18px; gap: 26px; }
  .hform { grid-template-columns: 1fr 1fr; }
  .hform button { grid-column: 1 / -1; }
  .row2 { grid-template-columns: 1fr; }
}

/* Ansichten */
.views { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px clamp(16px, 3vw, 40px) 0; }
.views[hidden], .intro[hidden] { display: none; }
.tabs { display: inline-flex; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.tabs button { font: inherit; color: var(--muted); background: transparent; border: 0; border-radius: 7px; padding: 6px 14px; cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-current] { background: var(--panel2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.baractions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Startseite */
.intro { max-width: 1120px; margin: 0 auto; padding: clamp(36px, 7vh, 84px) clamp(16px, 3vw, 40px) 24px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px 56px; align-items: center; }
.intro h1 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.08; letter-spacing: -0.035em; font-weight: 650; }
.lead { margin: 20px 0 28px; color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 56ch; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.big { padding: 12px 20px; font-size: 16px; border-radius: 10px; }
.intro .hint { margin: 18px 0 0; }
.demo { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: grid; gap: 10px; box-shadow: 0 30px 80px -40px rgba(127, 214, 178, 0.25); }
.demohead, .demofoot { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.demofoot { padding-top: 12px; border-top: 1px solid var(--line); align-items: baseline; }
.demofoot strong { color: var(--accent); font-size: 20px; letter-spacing: -0.02em; }
.demorow { display: grid; grid-template-columns: 28px repeat(4, minmax(0, 1fr)) 48px; gap: 6px; align-items: center; }
.demorow b { font-weight: 600; }
.demorow em { font-style: normal; text-align: right; font-weight: 600; }
.chip { padding: 6px 0; text-align: center; font-size: 13px; background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; }
.chip.wide { grid-column: span 4; color: var(--accent); }
.steps, .facts { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps li { padding: 20px 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.steps span { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-bottom: 12px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px; }
.steps h2, .facts h3 { font-size: 16px; margin-bottom: 6px; }
.steps p, .facts p { margin: 0; color: var(--muted); font-size: 14.5px; }
.facts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; padding-top: 14px; }

/* Monatsrapport als Blatt */
.sheetwrap { overflow-x: auto; display: grid; gap: 28px; justify-items: center; padding-bottom: 8px; }
.sheet { width: 210mm; min-height: 297mm; padding: 13mm 15mm; background: #fff; color: #111; border-radius: 4px; font-size: 12px; line-height: 1.35; display: flex; flex-direction: column; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8); }
.shead { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-bottom: 12px; border-bottom: 1.5px solid #111; }
.sfirm { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sfirm img { max-height: 54px; max-width: 170px; object-fit: contain; }
.sfirmtext { display: flex; flex-direction: column; color: #444; }
.sfirmtext strong { color: #111; font-size: 15px; }
.placeholder { color: #999 !important; font-weight: 500; }
.stitle { text-align: right; }
.stitle h2 { font-size: 22px; letter-spacing: -0.02em; white-space: nowrap; }
.smeta { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 12px 0; }
.smeta dt { color: #666; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.smeta dd { margin: 0; font-weight: 600; font-size: 13px; }
.stable { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.stable th:nth-child(1) { width: 5%; } .stable th:nth-child(2) { width: 7.5%; } .stable th:nth-child(3) { width: 29.5%; } .stable th:nth-child(4) { width: 7%; white-space: normal; }
.stable thead th { vertical-align: bottom; }
.stable th:nth-child(6), .stable th:nth-child(7), .stable th:nth-child(8) { width: 7.5%; }
.stable tfoot { display: table-row-group; }
.stable th, .stable td { padding: 3.2px 6px; text-align: right; vertical-align: top; border-bottom: 0.5px solid #d4d4d4; }
.stable .l { text-align: left; }
.stable thead th { font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #444; border-bottom: 1px solid #111; white-space: nowrap; }
.stable thead { display: table-header-group; }
.stable tr { break-inside: avoid; }
.stable tr.we td { background: #f1f1f1; color: #666; }
.stable tr.mon td { border-top: 1px solid #999; }
.stable tr.off td { color: #999; }
.stable .times span { display: inline-block; white-space: nowrap; margin-right: 7px; }
.stable .rem { overflow-wrap: anywhere; padding-left: 12px; }
.stable thead th:nth-child(5) { padding-left: 12px; }
.stable tfoot td { font-weight: 700; border-top: 1.5px solid #111; border-bottom: 0; padding-top: 5px; }
.ssum { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 12px; break-inside: avoid; }
.sbox { display: flex; flex-direction: column; justify-content: space-between; gap: 2px; padding: 6px 8px; border: 0.5px solid #bbb; border-radius: 4px; }
.sbox span { color: #555; font-size: 9.5px; line-height: 1.2; }
.sbox b { font-size: 13px; font-variant-numeric: tabular-nums; }
.sbox.strong { border: 1.5px solid #111; }
.sabs { margin: 8px 0 0; color: #555; font-size: 10.5px; }
.ssign { display: grid; grid-template-columns: 1fr 1fr; gap: 14mm; margin-top: auto; padding-top: 16mm; break-inside: avoid; }
.ssign div { display: flex; flex-direction: column; gap: 4px; color: #444; font-size: 10.5px; }
.ssign .line { border-bottom: 1px solid #111; height: 1px; }
.sfoot { display: flex; justify-content: space-between; margin-top: 8mm; color: #888; font-size: 9.5px; }

/* Jahresübersicht */
.ytable { overflow-x: auto; }
.ytable table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ytable th, .ytable td { padding: 12px 20px; text-align: right; border-bottom: 1px solid var(--line); font-weight: 400; white-space: nowrap; }
.ytable .l { text-align: left; }
.ytable thead th { color: var(--muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.ytable tbody th .btn.link { color: var(--text); font-size: 15px; font-weight: 600; padding: 0; }
.ytable tbody th .btn.link:hover { color: var(--accent); }
.ytable tr.off th .btn.link { color: var(--muted); font-weight: 500; }
.ytable .soll { color: var(--muted); }
.ytable tfoot th, .ytable tfoot td { font-weight: 650; background: var(--panel2); border-bottom: 0; }
.yearactions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; line-height: 1.5; }
.yearactions span { margin-left: 6px; }

/* Firma und Daten */
.logorow { display: flex; align-items: center; gap: 14px; }
.logopreview { display: grid; place-items: center; width: 150px; height: 64px; padding: 6px; background: #fff; border-radius: 8px; color: #888; font-size: 12px; }
.logopreview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logobtns { display: grid; gap: 8px; justify-items: start; }
.filebtn { position: relative; display: inline-block; overflow: hidden; color: var(--text) !important; font-size: 15px !important; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; }
.filebtn:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.exportrow { display: flex; flex-wrap: wrap; gap: 8px; }
.form h3 + .hint, .form .hint { margin: 0; }
.form .exportrow + h3 { margin-top: 14px; }
.error.good { color: var(--accent); }

@media (max-width: 1100px) {
  .periodbar .tiles { flex-basis: 100%; }
}
@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; gap: 32px; }
  .steps { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; gap: 22px; }
  .sheetwrap { justify-items: start; }
}
@media (max-width: 640px) {
  .views { padding-top: 10px; gap: 8px; flex-wrap: wrap; }
  .tabs button { padding: 6px 10px; font-size: 14px; }
  .views > .btn { padding: 7px 10px; font-size: 14px; }
  .facts { grid-template-columns: 1fr; }
  .lead { font-size: 16px; }
  .cta .btn { flex: 1 1 100%; }
  .baractions { width: 100%; }
  .baractions .btn { flex: 1 1 auto; }
  .ytable th, .ytable td { padding: 10px 12px; font-size: 14px; }
  .logorow { flex-wrap: wrap; }
}
