/* NBS Zeiterfassung – gleiche Gestaltung wie das NBS Urlaubstool (NBS Design-Manual: Fustat / Merriweather, Navy) */
@font-face { font-family: "Fustat"; font-weight: 500; font-display: swap; src: url("fonts/fustat-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Fustat"; font-weight: 600; font-display: swap; src: url("fonts/fustat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Merriweather"; font-weight: 300; font-display: swap; src: url("fonts/merriweather-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Merriweather"; font-weight: 700; font-display: swap; src: url("fonts/merriweather-latin-700-normal.woff2") format("woff2"); }

:root {
  --ink: #201d12; --paper: #f4f4f2; --navy: #17233c; --steel: #8396ac;
  --gruen: #4f9470; --gruen-hell: #b8d4c4; --blau: #0a5ea3; --blau-hell: #abceeb;
  --orange: #cf783d; --orange-hell: #ebc9b2; --rot: #a33a3a; --rot-hell: #f1d4d4;
  --linie: #e3e3df; --weiss: #fff; --radius: 10px;
  --ui: "Fustat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: "Merriweather", Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--ui); font-weight: 500; font-size: 15px; line-height: 1.5; }
a { color: var(--blau); }
h1, h2, h3 { font-family: var(--ui); font-weight: 600; color: var(--navy); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; margin-top: 1.6em; } h3 { font-size: 1rem; }
p.lead, .prosa { font-family: var(--text); font-weight: 300; }
.muted { color: #5b6475; } .klein { font-size: .85rem; }

/* Kopf */
header.top { background: var(--navy); color: #fff; }
header.top .innen { max-width: 1180px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 24px; min-height: 58px; flex-wrap: wrap; }
header.top .marke { font-weight: 600; letter-spacing: .02em; color: #fff; text-decoration: none; display: flex; align-items: center; gap: 10px; }
header.top .marke span.nbs { background: var(--gruen); padding: 3px 8px; border-radius: 4px; font-size: .8rem; letter-spacing: .08em; }
header.top .marke img.logo { height: 30px; width: 30px; display: block; }
header.top .marke .app { font-size: 1.02rem; }
header.top nav a.extern::after { content: " ↗"; font-size: .8em; opacity: .7; }
header.top nav .trenner { width: 1px; background: rgba(255,255,255,.18); margin: 6px 6px; }
header.top nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
header.top nav a { color: #dfe5ee; text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: .92rem; }
header.top nav a:hover, header.top nav a.aktiv { background: rgba(255,255,255,.12); color: #fff; }
header.top .wer { font-size: .85rem; color: var(--steel); }
header.top .wer a { color: #dfe5ee; margin-left: 8px; }
main { max-width: 1180px; margin: 0 auto; padding: 28px 20px 60px; }

/* Bausteine */
.karte { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.kachel { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px 16px; }
.kachel .wert { font-size: 1.8rem; font-weight: 600; color: var(--navy); line-height: 1.1; }
.kachel .label { font-size: .82rem; color: #5b6475; margin-top: 4px; }
.kachel.haupt { background: var(--navy); border-color: var(--navy); }
.kachel.haupt .wert, .kachel.haupt .label { color: #fff; }
.kachel.warn { border-color: var(--orange); background: #fff8f2; }

.btn { display: inline-block; border: 1px solid var(--navy); background: var(--navy); color: #fff; padding: 9px 16px; border-radius: 8px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.15); }
.btn.gruen { background: var(--gruen); border-color: var(--gruen); }
.btn.rot { background: var(--rot); border-color: var(--rot); }
.btn.outline { background: transparent; color: var(--navy); }
.btn.klein { padding: 5px 10px; font-size: .85rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.aktionen { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

table.liste { width: 100%; border-collapse: collapse; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; }
table.liste th, table.liste td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--linie); vertical-align: top; }
table.liste th { background: #eceeef; font-size: .82rem; color: #3c4557; font-weight: 600; }
table.liste td.zahl, table.liste th.zahl { text-align: right;  }
table.liste tr:last-child td { border-bottom: none; }
.tabelle-scroll { overflow-x: auto; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: #e7e9ee; color: #3c4557; white-space: nowrap; }
.badge.genehmigt { background: var(--gruen-hell); color: #24533b; }
.badge.beantragt, .badge.storno_angefragt { background: var(--orange-hell); color: #7a3f15; }
.badge.abgelehnt { background: var(--rot-hell); color: var(--rot); }
.badge.gemeldet { background: var(--orange-hell); color: #7a3f15; }
.badge.bestaetigt { background: var(--gruen-hell); color: #24533b; }
.badge.exportiert { background: var(--blau-hell); color: #0a3d6b; }
.badge.storniert { background: #e7e9ee; color: #6b7280; text-decoration: line-through; }

.meldung { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; border-left: 4px solid var(--gruen); background: #eef6f1; }
.meldung.fehler { border-color: var(--rot); background: #fbeeee; }
.meldung.warnung { border-color: var(--orange); background: #fff6ec; }
ul.warnungen { margin: 6px 0 0; padding-left: 18px; }
ul.warnungen li { margin-bottom: 4px; }

/* Formulare */
form.formular { display: grid; gap: 14px; }
.reihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
label { display: block; font-size: .85rem; font-weight: 600; color: #3c4557; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=date], input[type=time], input[type=datetime-local], input[type=number], input[type=url], input[type=file], select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid #cfd3da; border-radius: 8px; font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blau-hell); border-color: var(--blau); }
textarea { min-height: 70px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: .92rem; color: var(--ink); }
.check input { width: 18px; height: 18px; }
.wochentage { display: flex; gap: 10px; flex-wrap: wrap; }
.hilfe { font-size: .8rem; color: #5b6475; margin-top: 3px; }

.vorschau { border: 1px dashed var(--steel); border-radius: var(--radius); padding: 14px 16px; background: #fbfbfa; }
.vorschau .zahlen { display: flex; gap: 28px; flex-wrap: wrap; }
.vorschau .zahlen div strong { display: block; font-size: 1.5rem; color: var(--navy); }

/* Teamkalender */
.kal { border-collapse: collapse; font-size: .78rem; background: #fff; }
.kal th, .kal td { border: 1px solid var(--linie); padding: 0; text-align: center; min-width: 26px; height: 30px; }
.kal th.name, .kal td.name { text-align: left; padding: 0 10px; min-width: 150px; white-space: nowrap; font-size: .85rem; position: sticky; left: 0; background: #fff; z-index: 1; }
.kal th { background: #eceeef; font-weight: 600; padding: 4px 0; }
.kal .we { background: #f0f0ec; }
.kal .ft { background: #e3e9f1; }
.kal .heute { box-shadow: inset 0 0 0 2px var(--blau); }
.kal td.g { background: var(--gruen); }
.kal td.g.h { background: linear-gradient(135deg, var(--gruen) 50%, transparent 50%); }
.kal td.b { background: repeating-linear-gradient(45deg, var(--orange-hell), var(--orange-hell) 4px, #fff 4px, #fff 8px); }
.legende { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8rem; margin: 10px 0; }
.legende span::before { content: ""; display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; border: 1px solid var(--linie); }
.legende .lg::before { background: var(--gruen); } .legende .lh::before { background: linear-gradient(135deg, var(--gruen) 50%, #fff 50%); }
.legende .lb::before { background: repeating-linear-gradient(45deg, var(--orange-hell), var(--orange-hell) 3px, #fff 3px, #fff 6px); }
.legende .lf::before { background: #e3e9f1; } .legende .lw::before { background: #f0f0ec; }

.zentriert { max-width: 560px; margin: 40px auto; }
details summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.inline-form { display: inline; }
@media (max-width: 700px) {
  header.top .innen { gap: 6px 12px; padding: 8px 12px 0; justify-content: space-between; }
  header.top nav { order: 3; flex: 0 0 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
  header.top nav a { white-space: nowrap; }
  main { padding: 18px 12px 50px; }
  .kachel .wert { font-size: 1.45rem; }
  table.liste th, table.liste td { padding: 8px; }
  .nur-gross { display: none; }
}

/* ---- Zeiterfassung ---- */
.kachel.plus .wert { color: var(--gruen); } .kachel.minus .wert { color: var(--rot); }
.kachel.haupt.plus { background: var(--gruen); border-color: var(--gruen); }
.kachel.haupt.minus { background: var(--rot); border-color: var(--rot); }
.kachel.haupt.plus .wert, .kachel.haupt.minus .wert { color: #fff; }
.plus { color: #2f6e4d; } .minus { color: var(--rot); }

.stempel { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.stempel .status { font-size: .85rem; color: #5b6475; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.stempel .uhr { font-size: 3.2rem; font-weight: 600; color: var(--navy);  line-height: 1.05; margin: 4px 0 6px; }
.stempel .seit { color: #5b6475; }
.stempel.laeuft { border-color: var(--gruen); box-shadow: 0 0 0 3px rgba(79,148,112,.15); }
.stempel.laeuft .status { color: var(--gruen); }
.stempel.laeuft .status::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--gruen); margin-right: 7px; animation: puls 1.6s infinite; vertical-align: 1px; }
@keyframes puls { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.btn-gross { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 150px; height: 150px; border-radius: 50%; border: none; color: #fff; font: inherit; font-weight: 600; font-size: 1.25rem; cursor: pointer; box-shadow: 0 6px 18px rgba(23,35,60,.18); transition: transform .08s; }
.btn-gross:active { transform: scale(.97); }
.btn-gross.start { background: var(--gruen); }
.btn-gross.stop { background: var(--rot); }
.btn-gross svg { width: 38px; height: 38px; margin-bottom: 6px; fill: #fff; }
.stempel-extra { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.stempel-extra input[type=text] { min-width: 240px; }
.stempel-extra > div { flex: 1; min-width: 200px; }
.stempel-notiz { grid-column: 1 / -1; margin-top: 0; text-align: left; }

.eintraege { list-style: none; margin: 0; padding: 0; }
.eintraege li { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--linie); }
.eintraege li:last-child { border-bottom: none; }
.eintraege .zeit { font-weight: 600;  min-width: 118px; }
.eintraege .dauer { margin-left: auto;  color: var(--navy); font-weight: 600; }
.eintraege .notiz { color: #5b6475; font-size: .9rem; }

.umschalter { display: inline-flex; border: 1px solid var(--navy); border-radius: 8px; overflow: hidden; }
.umschalter a { padding: 6px 14px; text-decoration: none; color: var(--navy); font-weight: 600; font-size: .9rem; }
.umschalter a + a { border-left: 1px solid var(--navy); }
.umschalter a.aktiv { background: var(--navy); color: #fff; }
.kopfzeile { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.kopfzeile h1 { margin: 0; }

.balken { position: relative; height: 10px; background: #eceeef; border-radius: 99px; min-width: 80px; overflow: hidden; }
.balken span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--navy); border-radius: 99px; }
.balken span.voll { background: var(--gruen); }
.balken i { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--orange); }
tr.wochenende td { background: #f7f7f5; }
tr.frei td { background: #f2f5f9; }
tr.heute td:first-child { box-shadow: inset 3px 0 0 var(--blau); }
tr.heute td { background: #f5f8fc; }
td.zeiten-liste { font-size: .88rem;  }
td.zeiten-liste a { text-decoration: none; }
.chip { display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: .75rem; font-weight: 600; background: #e7e9ee; color: #3c4557; margin: 1px 2px 1px 0; white-space: nowrap; }
.chip.urlaub, .chip.sonder, .chip.unbezahlt { background: var(--gruen-hell); color: #24533b; }
.chip.krank, .chip.kind_krank { background: var(--orange-hell); color: #7a3f15; }
.chip.feiertag { background: #e3e9f1; color: var(--navy); }
.chip.nachtrag, .chip.admin { background: #f1ecf8; color: #5a3d86; }
table.liste tfoot td { font-weight: 600; background: #f7f7f5; }

/* Linkseite */
body.links-seite { background: var(--navy); min-height: 100vh; }
.links-wrap { max-width: 520px; margin: 0 auto; padding: 48px 18px 60px; text-align: center; }
.links-wrap .logo-icon { width: 76px; height: 76px; margin: 0 auto 18px; display: block; }
.links-wrap .wortmarke { height: 52px; width: auto; margin: 0 auto 6px; display: block; }
.links-wrap .unter { color: var(--steel); margin-bottom: 30px; font-size: .95rem; }
.link-karte { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 14px; padding: 14px 18px; margin-bottom: 12px; text-decoration: none; color: var(--ink); text-align: left; transition: transform .1s, box-shadow .1s; }
.link-karte:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.link-karte .sym { flex: 0 0 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.link-karte .sym svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.link-karte .t { font-weight: 600; font-size: 1.05rem; color: var(--navy); }
.link-karte .b { font-size: .85rem; color: #5b6475; }
.link-karte .pfeil { margin-left: auto; color: var(--steel); font-size: 1.2rem; }
.f-navy { background: var(--navy); } .f-gruen { background: var(--gruen); } .f-blau { background: var(--blau); }
.f-orange { background: var(--orange); } .f-steel { background: var(--steel); }
.links-wrap .fuss { margin-top: 28px; font-size: .8rem; color: var(--steel); }
.links-wrap .fuss a { color: #dfe5ee; }

.login-karte { text-align: center; }
.login-karte img { height: 30px; margin: 4px auto 18px; display: block; }
.anmerkung { font-size: .82rem; color: #5b6475; }
.zwei-spalten { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .zwei-spalten { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .stempel { grid-template-columns: 1fr; text-align: center; }
  .stempel .uhr { font-size: 2.6rem; }
  .stempel-extra { justify-content: center; }
  .btn-gross { width: 132px; height: 132px; margin: 0 auto; }
  header.top .marke img.logo { height: 26px; width: 26px; }
  .nur-mobil-aus { display: none; }
}

/* Fustat hat breite Tabellen-Doppelpunkte – Zeiten proportional setzen */
td.zahl, th.zahl { white-space: nowrap; }
.zahl, .uhr, .zeit, .dauer, .wert, td.zeiten-liste { font-variant-numeric: normal; font-feature-settings: "tnum" 0; }
