:root {
  --anthrazit: #2f353f;
  --salbei: #85a799;
  --salbei-hell: #d4dcd8;
  --altrosa: #e4d6da;
  --bg: #f7f7f5;
  --card: #ffffff;
  --border: #e5e3e0;
  --danger: #b3423d;
  --danger-bg: #fbeceb;
}

* { box-sizing: border-box; }

body {
  font-family: 'Montserrat', -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--anthrazit);
  margin: 0;
  line-height: 1.55;
}

header.topbar {
  background: var(--anthrazit);
  color: white;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header.topbar a { color: white; text-decoration: none; }
.brand-logo { height: 26px; display: block; filter: brightness(0) invert(1); }
header.topbar nav { font-size: 0.92rem; }
header.topbar nav a { margin-left: 18px; opacity: 0.9; }
header.topbar nav a:hover { opacity: 1; text-decoration: underline; }

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; font-weight: 600; margin-top: 32px; }
.subtitle { color: #6b7280; margin-top: 0; margin-bottom: 24px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 20px;
}

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); }
th { color: #6b7280; font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
tr.weekend td { color: #b0b3b8; }
tr.today { background: var(--salbei-hell); }

.btn {
  display: inline-block;
  background: var(--anthrazit);
  color: white;
  border: none;
  padding: 11px 22px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { opacity: 0.92; }
.btn.secondary { background: var(--salbei); color: white; }
.btn.danger { background: var(--danger); }
.btn.small { padding: 6px 14px; font-size: 0.8rem; }

.stamp-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }

.balance {
  font-size: 2rem;
  font-weight: 700;
  color: var(--anthrazit);
}
.balance-label { color: #6b7280; font-size: 0.85rem; }

form.inline { display: inline; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid.full { grid-template-columns: 1fr; }
label { display: block; font-size: 0.83rem; margin-bottom: 4px; color: #4b5157; font-weight: 500; }
input, select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  background: white;
}

.weekday-checks { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.weekday-checks label { display: flex; align-items: center; gap: 5px; font-weight: 500; margin: 0; }
.weekday-checks input { width: auto; }

.error {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.success {
  background: var(--salbei-hell);
  color: #2f6b4f;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
}
.pill.warn { background: #fdf0d5; color: #8a5a00; }
.pill.ok { background: var(--salbei-hell); color: #2f6b4f; }
.pill.muted { background: var(--altrosa); color: #7a5a63; }

/* Farbcode für Arbeitszeit-Arten (Legende in der Monatsübersicht) - kräftige, gut
   unterscheidbare Farben. Rot/Orange/Gelb bewusst unterschiedlich hell/dunkel gehalten (nicht
   nur unterschiedlicher Farbton), weil vier "warme" Farben nebeneinander sonst schwer
   auseinanderzuhalten sind; Sonderurlaub bewusst Violett statt Pink, weit weg von Rot UND Blau. */
.pill.c-gruen { background: #c8e6c9; color: #1b5e20; }
.pill.c-gelb { background: #fff3c4; color: #7a4a00; }
.pill.c-rot { background: #ffcdd2; color: #7a0000; }
.pill.c-blau { background: #bbdefb; color: #0d47a1; }
.pill.c-lila { background: #e1bee7; color: #4a148c; }
.pill.c-orange { background: #ffccbc; color: #8a3800; }
.pill.c-schwarz { background: #dcdcdc; color: #1a1a1a; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0 20px; font-size: 0.85rem; }
.legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }

/* Grafische Jahresuebersicht: eine Zeile pro Monat, ein Kaestchen pro Tag */
.jahreskalender { overflow-x: auto; }
.jahreskalender table { border-collapse: separate; border-spacing: 2px; width: auto; }
.jahreskalender th { padding: 2px; font-size: 0.65rem; text-align: center; color: #9aa0a6; font-weight: 500; text-transform: none; letter-spacing: 0; }
.jahreskalender td.monatsname { text-align: left; font-size: 0.82rem; font-weight: 600; color: var(--anthrazit); padding: 4px 10px 4px 0; white-space: nowrap; border-bottom: none; }
.jahreskalender td.tag { padding: 0; border-bottom: none; width: 20px; }
.tag-box { width: 20px; height: 20px; border-radius: 4px; }
.tag-box.cal-neutral { background: #ffffff; border: 1px solid var(--border); }
.tag-box.cal-zukunft { background: #eef2f5; border: 1px dashed #c3ccd3; }
.tag-box.cal-grau { background: #d9d9d9; }
.tag-box.cal-gruen { background: #2e7d32; }
.tag-box.cal-gelb { background: #fbc02d; }
.tag-box.cal-rot { background: #b71c1c; }
.tag-box.cal-blau { background: #1565c0; }
.tag-box.cal-lila { background: #7b1fa2; }
.tag-box.cal-orange { background: #e65100; }
.tag-box.cal-split { background: none; border: 1px solid var(--border); }

.login-wrap {
  max-width: 380px;
  margin: 10vh auto;
  padding: 0 20px;
  text-align: center;
}
.login-wrap .brand-logo-lg { height: 40px; margin-bottom: 28px; }
.login-wrap form { text-align: left; }

.hint { color: #6b7280; font-size: 0.85rem; margin-top: 6px; }

@media print {
  @page { margin: 1.5cm; }
  header.topbar, .no-print { display: none !important; }
  body { background: white; }
  main { max-width: none; padding: 0; }
  .card { border: none; padding: 0; border-radius: 0; }
}

.signature-row {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
}
.signature-line {
  border-top: 1px solid var(--anthrazit);
  width: 260px;
  padding-top: 6px;
  font-size: 0.85rem;
  color: #6b7280;
}

.month-strip { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 40px; }
.month-chip {
  padding: 6px 14px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--border);
  color: var(--anthrazit);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}
.month-chip:hover { border-color: var(--salbei); }
.month-chip.vergangen { color: #9aa0a6; }
.month-chip.aktuell { background: var(--anthrazit); color: white; border-color: var(--anthrazit); }
