/* hausmeister4you Nachweisportal */
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("/fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("/fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url("/fonts/figtree-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 800; font-display: swap; src: url("/fonts/figtree-latin-800-normal.woff2") format("woff2"); }

:root {
  --ink: #141414;
  --muted: #555;
  --line: #E3E6E0;
  --line-strong: #D5D9D1;
  --bg: #F4F6F2;
  --card: #FFFFFF;
  --green: #2D6B1E;
  --green-soft: #E3F0DC;
  --green-mark: #4A9A2F;
  --blue: #1565C0;
  --blue-mark: #1E88E5;
  --blue-soft: #EEF5FC;
  --orange: #A34700;
  --orange-mark: #F07A10;
  --orange-soft: #FFF4E5;
  --yellow: #F5B800;
  --red: #B3261E;
  --radius: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--blue); }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: 20px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 800; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.stripes { display: grid; grid-template-columns: repeat(4, 1fr); height: 6px; }
.stripes span:nth-child(1) { background: var(--green-mark); }
.stripes span:nth-child(2) { background: var(--yellow); }
.stripes span:nth-child(3) { background: var(--orange-mark); }
.stripes span:nth-child(4) { background: var(--blue-mark); }

/* Layout */
.topbar {
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 10px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 10;
}
.topbar img { height: 36px; width: auto; display: block; }
.topbar .who { display: flex; gap: 12px; align-items: center; font-size: 14px; }
.topbar nav { display: flex; gap: 6px; flex-wrap: wrap; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 20px 16px 48px; }
.narrow { max-width: 560px; margin: 0 auto; padding: 16px 16px 120px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.split > .side { flex: 1 1 240px; min-width: 0; }
.split > .main { flex: 999 1 600px; min-width: 0; }

.card { background: var(--card); border-radius: var(--radius); padding: 16px; }
.card.bordered { border: 1px solid var(--line); }
.card.focus { border: 3px solid var(--blue-mark); }
.kpi .val { font-size: 30px; font-weight: 800; }

/* Buttons & inputs */
button, .btn {
  font: inherit; font-weight: 700; cursor: pointer; border-radius: 14px;
  min-height: 48px; padding: 0 18px; border: 2px solid var(--line-strong);
  background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; line-height: 1.2;
}
button:disabled { opacity: .5; cursor: not-allowed; }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-green { background: var(--green); color: #fff; border-color: var(--green); }
.btn-blue { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-big { min-height: 58px; font-size: 17px; font-weight: 800; width: 100%; }
.btn-sm { min-height: 40px; padding: 0 12px; font-size: 14px; border-radius: 12px; }
.chip { min-height: 40px; border-radius: 999px; padding: 0 14px; font-size: 14px; border-width: 1px; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.toggle { justify-content: flex-start; text-align: left; width: 100%; min-height: 52px; border-radius: 12px; }
.toggle[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.toggle .box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid #9AA195; flex-shrink: 0; }
.toggle[aria-pressed="true"] .box { border-color: #8FD16E; background: #8FD16E; }
.opt[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue-mark); color: #0D47A1; }

label.lbl { font-size: 14px; font-weight: 700; display: block; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=month], input[type=time], select, textarea {
  font: inherit; width: 100%; min-height: 48px; border: 2px solid var(--line-strong); border-radius: 12px;
  padding: 10px 12px; background: #fff; color: var(--ink);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--blue-mark); outline-offset: 2px; }
.field { display: flex; flex-direction: column; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks label { display: flex; gap: 8px; align-items: center; min-height: 40px; font-weight: 600; }
.checks input { width: 20px; height: 20px; }

/* Status */
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.pill.ok { background: var(--green-soft); color: var(--green); }
.pill.warn { background: var(--orange-soft); color: var(--orange); }
.pill.run { background: var(--blue-soft); color: #0D47A1; }
.pill.gray { background: #ECEEEA; color: #444; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.dot.winterdienst { background: var(--blue-mark); }
.dot.reinigung { background: var(--green-mark); }
.dot.gruenpflege { background: var(--orange-mark); }
.dot.hausmeister { background: var(--ink); }

.alert { border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.alert.err { background: #FCE8E6; color: var(--red); font-weight: 600; }
.alert.info { background: var(--blue-soft); color: #0D3B66; }
.alert.warn { background: var(--orange-soft); color: #5A3300; }
.alert.ok { background: var(--green-soft); color: var(--green); font-weight: 600; }

/* Lists */
.list { background: var(--card); border-radius: var(--radius); padding: 4px 16px; }
.li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #EEF0EC; }
.li:last-child { border-bottom: none; }
.li .grow { flex: 1; min-width: 0; }
.li-title { font-weight: 700; }
a.li { color: inherit; text-decoration: none; }

/* Hausmeister */
.hm-head { background: var(--ink); color: #fff; padding: 16px 16px 18px; }
.hm-head .muted { color: #BDBDBD; }
.objcard { background: var(--card); border-radius: 16px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; border: 2px solid transparent; }
.objcard.done { opacity: .75; }
.objcard .badge { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-weight: 800; border: 2px solid var(--line-strong); color: var(--muted); }
.objcard.done .badge { background: var(--green-soft); border-color: var(--green-soft); color: var(--green); }
.objcard.run { border-color: var(--blue-mark); }
.objcard.run .badge { background: var(--blue-mark); border-color: var(--blue-mark); color: #fff; }
.photo-slot { height: 140px; border-radius: 14px; border: 3px dashed var(--blue-mark); background: var(--blue-soft); color: var(--blue); font-weight: 800; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; position: relative; overflow: hidden; }
.photo-slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.thumb { position: relative; border-radius: 12px; overflow: hidden; background: #DCE4EC; aspect-ratio: 4 / 3; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .cap { position: absolute; left: 6px; bottom: 6px; background: rgba(20,20,20,.8); color: #fff; border-radius: 8px; padding: 2px 7px; font-size: 11px; font-weight: 700; }
.thumb .del { position: absolute; right: 4px; top: 4px; min-height: 32px; width: 32px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.92); border: none; font-size: 16px; }
.bottombar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); z-index: 20; }
.bottombar .inner { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 48px; padding: 0; font-size: 22px; }
.stepper output { min-width: 76px; text-align: center; font-size: 20px; font-weight: 800; }

/* Tabellen */
.tablebox { background: var(--card); border-radius: 18px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 12px 14px; font-weight: 700; }
td { padding: 12px 14px; border-top: 1px solid #EEF0EC; vertical-align: top; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #FAFBF9; }

/* Dialog */
dialog { border: none; border-radius: 20px; padding: 0; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 24px); }
dialog::backdrop { background: rgba(20,20,20,.45); }
dialog .dlg { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
dl.facts { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; margin: 0; font-size: 14px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 600; }

/* Login */
.login { min-height: 100vh; display: flex; flex-wrap: wrap; }
.login .pitch { flex: 1 1 380px; background: var(--ink); color: #fff; padding: 40px 32px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.login .pitch p { color: #D6D6D6; }
.login .form { flex: 999 1 420px; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.login .box { width: 100%; max-width: 420px; background: #fff; border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 12px 32px rgba(20,20,20,.06); }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 110px; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 100; max-width: calc(100vw - 32px); }

@media (max-width: 520px) {
  h1 { font-size: 24px; }
  dl.facts { grid-template-columns: 110px 1fr; }
  .wrap { padding: 16px 12px 40px; }
}

/* Druck: Monatsnachweis & Aushang */
.print-page { background: #fff; }
.print-only { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; }
  .no-print { display: none !important; }
  .print-only { display: block; }
  .card, .tablebox, .list { box-shadow: none; }
  tr { break-inside: avoid; }
}
