/* Fischer Service – Handy-App (Mitarbeiter). Handy zuerst, Akzent wie Logo. */
:root {
  --rot: #e2001a; --rot-soft: #fbe3e1; --ink: #2a2118; --muted: #7a6c5c; --line: #e4d9c6;
  --bg: #efe6d6; --karte: #fcf9f3; --gruen: #1f7a46; --gruen-soft: #dff4e7; --gelb: #8a5a00; --gelb-soft: #fff1cc;
  --blau: #1d4ea8; --blau-soft: #e6eefc; --grau-soft: #ebe2d3;
  /* Holz-Hintergrund (02.11.2026): helle Eiche, selbst erzeugt (holz.svg), darüber ein leichter heller Schleier für gute Lesbarkeit */
  --holz: linear-gradient(180deg, rgba(255,250,240,.30), rgba(255,250,240,.18)), url("/app/holz.webp?v=1");
  /* „only light“: Samsung Internet / Chrome dürfen die Seite im Android-Dunkelmodus NICHT zwangsweise abdunkeln (Ursache „App schwarz“) */
  color-scheme: only light;
  --r: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
html { background: #ead2a8; }
body { background: transparent; } /* sonst deckt der Body die Holz-Ebene (z-index -1) zu */
/* Holz als feste Ebene mit eigener GPU-Schicht (statt background-attachment: fixed) – kein Neumalen beim Scrollen */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--holz); background-size: auto, 720px 540px; transform: translateZ(0); will-change: transform; }
html { overscroll-behavior-y: none; }
body { color: var(--ink); font: 400 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
img { display: block; }

.icon { font-family: "Material Symbols Rounded"; font-weight: 400; font-style: normal; font-size: 22px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; vertical-align: middle; }
.icon.s16 { font-size: 16px; } .icon.s20 { font-size: 20px; } .icon.s28 { font-size: 28px; }

/* ----- Schale ----- */
.shell { max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; background: transparent; position: relative; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 14px) 16px 10px; background: rgb(250,242,228); box-shadow: 0 1px 0 rgba(138,100,64,.18); }
.topbar h1 { flex: 1; font-size: 26px; font-weight: 750; letter-spacing: -0.02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .logo { width: 40px; height: 40px; object-fit: contain; flex: none; }
.back { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--karte); box-shadow: 0 1px 2px rgba(0,0,0,.08); flex: none; }
main { flex: 1; padding: 4px 16px calc(104px + env(safe-area-inset-bottom)); }

.tabs { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 6; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 6px 6px calc(8px + env(safe-area-inset-bottom)); background: rgba(250,246,238,.97); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.04); }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 2px; border-radius: 14px; font-size: 11px; font-weight: 600; color: #8b8b92; }
.tabs a .icon { font-size: 26px; transition: color .15s; }
.tabs a.on { color: var(--rot); }
.tabs a.on .icon { font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }

/* ----- Bausteine ----- */
.karte { background: var(--karte); border-radius: var(--r); box-shadow: 0 1px 3px rgba(60,40,20,.10); padding: 14px 16px; margin: 0 0 12px; }
.abschnitt { display: flex; align-items: center; justify-content: space-between; margin: 18px 2px 8px; font-size: 13px; font-weight: 750; color: #4f3a24; text-shadow: 0 1px 0 rgba(255,248,234,.7); text-transform: uppercase; letter-spacing: .06em; }
.muted { color: var(--muted); }
.klein { font-size: 13px; }
.gruss { font-size: 24px; font-weight: 750; letter-spacing: -0.02em; margin: 2px 2px 2px; }
.datum { color: var(--muted); margin: 0 2px 14px; font-size: 14px; }
.leer { text-align: center; color: var(--muted); padding: 22px 12px; }
.leer .icon { font-size: 34px; color: #c4c4c9; display: block; margin: 0 auto 6px; }
.etitel { font-weight: 650; font-size: 16px; line-height: 1.25; }
.esub { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 4px; margin-top: 3px; min-width: 0; }
.esub .icon { flex: none; }
.zeile { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.zeile:first-child { border-top: 0; padding-top: 2px; }
.zeile .zt { flex: 1; min-width: 0; }
.zeile > .icon { color: #a0a0a6; }

.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: var(--grau-soft); color: #45454b; white-space: nowrap; }
.chip.warn { background: var(--gelb-soft); color: var(--gelb); }
.chip.ok { background: var(--gruen-soft); color: var(--gruen); }
.chip.no { background: var(--rot-soft); color: #a1001a; }
.chip.info { background: var(--blau-soft); color: var(--blau); }
.chip.rot { background: var(--rot); color: #fff; }

.btn { height: 48px; padding: 0 18px; border-radius: 14px; font-weight: 650; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--karte); color: var(--ink); box-shadow: 0 1px 2px rgba(60,40,20,.08); white-space: nowrap; }
.btn:disabled { opacity: .55; }
.btn.primary { background: var(--rot); color: #fff; box-shadow: 0 6px 16px rgba(226,0,26,.25); }
.btn.dunkel { background: var(--ink); color: #fff; }
.btn.weiss { background: #fff; color: var(--rot); }
.btn.ghost { background: transparent; box-shadow: none; color: var(--rot); }
.btn.block { width: 100%; }
.btn.klein { height: 38px; font-size: 14px; padding: 0 12px; border-radius: 12px; }
.aktionen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 12px; }
.aktionen .btn { flex-direction: column; height: auto; padding: 12px 4px; gap: 4px; font-size: 12px; border-radius: 16px; }
.aktionen .btn .icon { font-size: 24px; color: var(--rot); }
.aktionen .btn.primary { color: #fff; }
.aktionen .btn.primary .icon { color: #fff; }

.feld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.feld > span.lbl { font-size: 13px; font-weight: 650; color: var(--muted); }
input, select, textarea { width: 100%; padding: 12px 14px; border: 1px solid #ddd0ba; border-radius: 12px; background: #fffdf8; font-size: 16px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--rot); box-shadow: 0 0 0 3px rgba(226,0,26,.12); }
textarea { min-height: 84px; resize: vertical; }
.zweispalt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.zweispalt > .feld, .feld { min-width: 0; }
input[type=date], input[type=time], input[type=number] { min-width: 0; max-width: 100%; -webkit-appearance: none; appearance: none; }
.zeile-form { display: flex; gap: 8px; align-items: center; }
.zeile-form input { flex: 1; }

/* ----- Timer ----- */
.timer { position: relative; overflow: hidden; }
.timer.laeuft { background: var(--rot); color: #fff; box-shadow: 0 10px 26px rgba(226,0,26,.28); }
.timer.laeuft .muted { color: rgba(255,255,255,.85); }
.timer .uhr { font-size: 44px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; margin: 6px 0 12px; }
.timer .kopf { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; }
.timer .btn { width: 100%; }

/* ----- Plan ----- */
.wochennav { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; }
.wochennav .titel { flex: 1; font-weight: 700; text-align: center; font-size: 15px; }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--karte); box-shadow: 0 1px 2px rgba(0,0,0,.06); flex: none; }
.tagband { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.tagband button { position: relative; background: var(--karte); border-radius: 16px; padding: 9px 0 10px; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.tagband button .wt { display: block; font-size: 11px; font-weight: 650; color: var(--muted); }
.tagband button .tn { display: block; font-size: 17px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tagband button.heute .tn { color: var(--rot); }
.tagband button.on { background: var(--ink); color: #fff; }
.tagband button.on .wt { color: #cfcfd4; }
.tagband button.on .tn { color: #fff; }
.tagband button .punkt { position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--rot); transform: translateX(-50%); }
.tagband button.on .punkt { background: #fff; }

/* ----- Einsatz / Zeit ----- */
.einsatz { position: relative; display: block; background: var(--karte); border-radius: var(--r); box-shadow: 0 1px 3px rgba(60,40,20,.10); padding: 13px 16px 13px 20px; margin-bottom: 10px; overflow: hidden; }
.einsatz::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--farbe, var(--rot)); }
.einsatz .ez { font-size: 13px; font-weight: 700; color: var(--farbe, var(--rot)); margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.einsatz .ebeschr { margin-top: 8px; font-size: 13px; color: #4a4a50; background: #f3ece0; border-radius: 10px; padding: 8px 10px; }
.hinweis { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--gelb-soft); color: var(--gelb); font-weight: 600; margin-bottom: 10px; }
.hinweis.blau { background: var(--blau-soft); color: var(--blau); }
.hinweis.grau { background: var(--grau-soft); color: #45454b; }

.zeitzeile { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--karte); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.zeitzeile .zt { flex: 1; min-width: 0; }
.zeitzeile .dauer { font-weight: 750; font-variant-numeric: tabular-nums; font-size: 16px; text-align: right; }
.zeitzeile .zr { text-align: right; flex: none; }
.summe { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 4px 10px; color: var(--muted); font-size: 14px; }
.summe b { color: var(--ink); font-size: 17px; font-variant-numeric: tabular-nums; }

/* ----- Projekt ----- */
.projekt .kopf { display: flex; align-items: flex-start; gap: 10px; }
.projekt .kopf .etitel { font-size: 19px; }
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 6px 10px; margin-top: 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.chatliste { max-height: 360px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; padding: 2px 0 10px; }
.msg { max-width: 84%; background: #efe7d9; border-radius: 16px 16px 16px 4px; padding: 9px 12px; align-self: flex-start; }
.msg.eigen { align-self: flex-end; background: var(--rot); color: #fff; border-radius: 16px 16px 4px 16px; }
.msg .mkopf { font-size: 12px; opacity: .75; margin-bottom: 2px; }
.msg .mtext { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .anhang { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 13px; text-decoration: underline; }
.chatform { display: flex; gap: 8px; align-items: flex-end; margin-top: 6px; }
.chatform textarea { min-height: 46px; height: 46px; padding: 11px 14px; border-radius: 22px; }
.chatform .btn { width: 48px; height: 48px; padding: 0; border-radius: 50%; flex: none; }
.fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.fotos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: #e8dfcf; }

/* ----- Sheet ----- */
.sheet-bg { position: fixed; inset: 0; z-index: 20; background: rgba(10,10,14,.42); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease; }
.sheet { width: 100%; max-width: 480px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); border-radius: 24px 24px 0 0; padding: 8px 16px calc(22px + env(safe-area-inset-bottom)); animation: hoch .22s ease; }
.sheet .grip { width: 40px; height: 5px; border-radius: 3px; background: #cdbfa8; margin: 4px auto 10px; }
.sheet-kopf { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sheet-kopf h2 { flex: 1; font-size: 20px; font-weight: 750; }
.sheet .karte { margin-bottom: 10px; }
@keyframes hoch { from { transform: translateY(40px); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); max-width: calc(100% - 32px); width: max-content; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 14px; font-weight: 600; font-size: 14px; z-index: 30; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.offline { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border-radius: 14px; background: var(--grau-soft); color: #3a3a40; font-size: 14px; font-weight: 600; }
.fehler-karte { text-align: center; }
.fehler-karte .icon { font-size: 34px; color: var(--rot); display: block; margin: 0 auto 6px; }

/* ----- Login ----- */
.login { padding-top: 10px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.login .grosslogo { width: 112px; height: 112px; object-fit: contain; margin: 8px 0 10px; }
.login h2 { font-size: 24px; font-weight: 750; letter-spacing: -0.02em; }
.login .namen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin: 18px 0 16px; }
.name-chip { background: var(--karte); border-radius: 18px; padding: 18px 10px; font-weight: 700; font-size: 17px; border: 2px solid transparent; box-shadow: 0 1px 3px rgba(60,40,20,.10); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.name-chip .av { width: 48px; height: 48px; border-radius: 50%; background: #ece3d3; display: grid; place-items: center; font-weight: 750; color: #6b5a45; font-size: 18px; }
.name-chip.on { border-color: var(--rot); color: var(--rot); }
.name-chip.on .av { background: var(--rot); color: #fff; }
.loginform { width: 100%; text-align: left; }
.loginform input.pin { text-align: center; font-size: 26px; letter-spacing: .4em; font-weight: 700; padding: 14px; }
.fehlertext { color: #a1001a; font-weight: 600; min-height: 20px; margin: 10px 2px 0; text-align: center; }

/* ----- Mehr ----- */
.profil { display: flex; align-items: center; gap: 14px; }
.profil .av { width: 60px; height: 60px; border-radius: 50%; background: var(--rot); color: #fff; display: grid; place-items: center; font-weight: 750; font-size: 22px; flex: none; }
.profil .etitel { font-size: 19px; }
.liste .zeile { padding: 14px 0; }
.liste .zeile .icon:first-child { color: var(--rot); }

.spinner { display: grid; place-items: center; padding: 60px 0; }
.spinner::after { content: ""; width: 30px; height: 30px; border-radius: 50%; border: 3px solid #e2d7c4; border-top-color: var(--rot); animation: dreh .8s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Lange Projektliste: nur sichtbare Karten zeichnen */
.pkarte { content-visibility: auto; contain-intrinsic-size: auto 104px; }

/* Berichte 02.11.2026: Vorlagen-Formular, Fotos Kamera/Galerie, Unterschrift */
.info { padding: 10px 14px; border-radius: 12px; background: rgba(0,0,0,.04); font-size: 15px; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.abschnitt-k { font-size: 15px; font-weight: 750; margin: 18px 0 8px; }
.trow { border: 1px solid #e6dac5; border-radius: 14px; padding: 12px 12px 4px; margin-bottom: 8px; background: rgba(255,255,255,.5); }
.trow .feld { margin-bottom: 8px; }
.link-weg { background: none; color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 0 8px; }
.klein-btn { height: 40px; font-size: 14px; margin-bottom: 12px; }
.hinweis { font-size: 14px; color: var(--muted); background: rgba(0,0,0,.04); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
label.haken { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 15px; }
label.haken input { width: 22px; height: 22px; flex: none; accent-color: var(--rot); }
.fotoliste { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.fotozeile { display: flex; align-items: center; gap: 8px; }
.fotozeile img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; background: #eee; }
.fotozeile input { flex: 1; min-width: 0; }
.us-pad { width: 100%; height: 130px; border: 1px dashed #c9b998; border-radius: 12px; background: #fff; touch-action: none; margin-top: 6px; }
