/* Larooms Feen — Design nach Larooms-Website-Tokens */
@font-face { font-family: 'Manrope'; src: url('/fonts/manrope-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/fonts/manrope-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/fonts/manrope-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url('/fonts/hanken-grotesk-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url('/fonts/hanken-grotesk-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --sand-50:#FBF8F3; --sand-100:#F4EDE2; --sand-200:#E8DFD3; --sand-300:#D8CBB6;
  --ink-900:#1B1916; --ink-700:#423B31; --ink-500:#7A7160; --ink-400:#9A8F7C;
  --clay-600:#525F45; --clay-500:#617455; --clay-200:#D2DAC6; --clay-100:#E3E8DA;
  --success:#5B7A52; --success-bg:#E6ECDF;
  --warning:#C0883E; --warning-bg:#F6E8D2;
  --danger:#B4543C; --danger-bg:#F3DDD5;
  --r-sm:8px; --r-md:12px; --r-lg:18px;
  --font-head:'Manrope',system-ui,sans-serif;
  --font-body:'Hanken Grotesk',system-ui,sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--sand-50);
  color: var(--ink-900);
  font-size: 16px; line-height: 1.45;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink-900); }
img { max-width: 100%; display: block; }

.boot { padding: 40vh 0; text-align: center; color: var(--ink-400); }

/* ---------- Kopf ---------- */
.topbar {
  background: var(--sand-200);
  padding: calc(14px + env(safe-area-inset-top)) 18px 14px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--sand-300);
}
.topright { display: flex; align-items: center; gap: 10px; }
.toplogo {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(27, 25, 22, 0.16);
}
.wordmark { font-family: var(--font-head); font-weight: 800; letter-spacing: -0.02em; font-size: 19px; }
.wordmark .feen { color: var(--clay-600); font-weight: 600; }
.topbar .who { font-size: 13px; color: var(--ink-500); text-align: right; line-height: 1.2; }
.topbar .who button { background: none; border: none; color: var(--clay-600); font-size: 13px; padding: 0; text-decoration: underline; }

main { padding: 18px 16px 30px; max-width: 720px; margin: 0 auto; }

h2 { font-family: var(--font-head); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; margin: 4px 0 14px; }
h3 { font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.06em; margin: 22px 0 10px; }

/* ---------- Karten ---------- */
.card {
  background: #fff; border: 1px solid var(--sand-200); border-radius: var(--r-md);
  padding: 14px; margin-bottom: 10px;
}
.card.tap { width: 100%; text-align: left; display: block; }
.card.tap:active { background: var(--sand-100); }
.job-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.job-apt { font-family: var(--font-head); font-weight: 800; font-size: 17px; }
.job-sub { color: var(--ink-500); font-size: 14px; margin-top: 2px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.badge { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.badge.sameday { background: var(--warning-bg); color: var(--warning); }
.badge.offen { background: var(--sand-100); color: var(--ink-500); }
.badge.in_arbeit { background: var(--clay-100); color: var(--clay-600); }
.badge.erledigt { background: var(--success-bg); color: var(--success); }
.badge.storniert { background: var(--danger-bg); color: var(--danger); text-decoration: line-through; }
.badge.mangel { background: var(--danger-bg); color: var(--danger); }
.badge.material { background: var(--warning-bg); color: var(--warning); }
.badge.routine { background: #EADFF0; color: #6B4A7D; }

/* Auftragsarten */
.badge.art-r { background: var(--ink-900); color: var(--sand-50); }
.badge.art-zrm { background: var(--clay-100); color: var(--clay-600); border: 1px solid var(--clay-400); }
.badge.art-zro { background: var(--sand-100); color: var(--ink-500); border: 1px solid var(--sand-300); }

/* 6-Wochen-Routine */
.routine-head { color: #6B4A7D !important; }
.routine-card { border-color: #D8C4E4; background: #FBF7FD; }
.ownerhead {
  font-family: var(--font-head); font-weight: 800; font-size: 13px; color: var(--ink-700);
  text-transform: uppercase; letter-spacing: 0.05em; margin: 18px 0 8px;
  padding-bottom: 4px; border-bottom: 2px solid var(--sand-300);
}

.date-head {
  font-family: var(--font-head); font-weight: 600; font-size: 14px;
  color: var(--ink-700); background: var(--sand-100); border-radius: var(--r-sm);
  padding: 6px 12px; margin: 18px 0 8px; position: sticky; top: 62px; z-index: 5;
}
.empty { color: var(--ink-400); text-align: center; padding: 30px 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink-900); color: var(--sand-50); border: none;
  border-radius: var(--r-sm); padding: 13px 18px; font-weight: 600; font-size: 16px;
}
.btn:active { background: var(--ink-700); }
.btn.full { width: 100%; }
.btn.accent { background: var(--clay-500); }
.btn.ghost { background: transparent; color: var(--ink-900); border: 1.5px solid var(--sand-300); }
.btn.danger { background: var(--danger); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.small { padding: 7px 12px; font-size: 14px; border-radius: 7px; }

/* ---------- Formulare ---------- */
label.f { display: block; font-size: 13px; font-weight: 600; color: var(--ink-500); margin: 12px 0 4px; }
input.f, select.f, textarea.f {
  width: 100%; border: 1.5px solid var(--sand-300); border-radius: var(--r-sm);
  padding: 11px 12px; background: #fff;
}
input.f:focus, select.f:focus, textarea.f:focus { outline: 2px solid var(--clay-500); border-color: transparent; }

/* ---------- Login ---------- */
.login { max-width: 380px; margin: 8vh auto 0; padding: 0 20px; text-align: center; position: relative; }
/* Logo als dezentes Wasserzeichen hinter dem Login */
.login::before {
  content: '';
  position: fixed; inset: 0;
  background: url('/logo.png') no-repeat center 46% / min(86vw, 460px);
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}
.login > * { position: relative; z-index: 1; }
.login .wordmark { font-size: 30px; }
.login p.sub { color: var(--ink-500); margin: 6px 0 26px; }
.userpick { display: flex; flex-direction: column; gap: 10px; }
.userpick button {
  background: #fff; border: 1.5px solid var(--sand-300); border-radius: var(--r-md);
  padding: 15px; font-size: 17px; font-weight: 600; font-family: var(--font-head);
}
.userpick button.sel, .userpick button:active { border-color: var(--clay-500); background: var(--clay-100); }
.userpick .role { display: block; font-size: 12px; font-weight: 400; color: var(--ink-400); font-family: var(--font-body); }
.pinrow { margin-top: 18px; }
.pinrow input { text-align: center; letter-spacing: 8px; font-size: 24px; }

/* ---------- Job-Detail ---------- */
.jobhead { background: var(--sand-200); border-radius: var(--r-lg); padding: 18px; margin-bottom: 18px; }
.jobhead .apt { font-family: var(--font-head); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; }
.jobhead .meta { color: var(--ink-700); font-size: 14px; margin-top: 4px; }
.jobhead .note { margin-top: 10px; font-size: 14px; background: #fff; border-radius: var(--r-sm); padding: 8px 10px; }

.check {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 2px;
  border-bottom: 1px solid var(--sand-100); cursor: pointer;
}
.check input { width: 22px; height: 22px; accent-color: var(--clay-500); flex-shrink: 0; margin-top: 1px; }
.check.done span { color: var(--ink-400); text-decoration: line-through; }

.room { border: 1px solid var(--sand-200); border-radius: var(--r-md); background: #fff; padding: 12px; margin-bottom: 10px; }
.room .rhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.room .rname { font-family: var(--font-head); font-weight: 600; font-size: 16px; }
.room .rname .cnt { color: var(--ink-400); font-weight: 400; font-size: 14px; }
.room.ok { border-color: var(--clay-200); background: var(--clay-100); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumbs .th { position: relative; }
.thumbs img { width: 74px; height: 74px; object-fit: cover; border-radius: var(--r-sm); }
.thumbs .del {
  position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink-900); color: #fff; border: none; font-size: 14px; line-height: 1;
}
.progress { font-size: 14px; color: var(--ink-500); margin: 6px 0 14px; }
.progress b { color: var(--clay-600); }

.sticky-bottom {
  position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom));
  padding: 10px 16px; background: linear-gradient(transparent, var(--sand-50) 40%); z-index: 15;
}
.sticky-bottom .btn { max-width: 720px; margin: 0 auto; display: flex; }

/* ---------- Galerie / Nachweise ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); }
.g-room { font-size: 13px; font-weight: 600; color: var(--ink-500); margin-top: 12px; }
.lightbox {
  position: fixed; inset: 0; background: rgba(27,25,22,0.92); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.lightbox img { max-height: 88vh; border-radius: var(--r-sm); }
.lightbox .cap { position: fixed; bottom: 20px; left: 0; right: 0; text-align: center; color: var(--sand-50); font-size: 14px; }

/* ---------- Tabbar ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  background: #fff; border-top: 1px solid var(--sand-200);
  display: flex; padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button {
  flex: 1; background: none; border: none; padding: 9px 4px 7px;
  font-size: 11px; font-weight: 600; color: var(--ink-400); font-family: var(--font-head);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.tabbar button.on { color: var(--clay-600); }
.tabbar svg { width: 23px; height: 23px; }
.tabbar .dot { position: relative; }
.tabbar .dot::after {
  content: ''; position: absolute; top: -2px; right: -6px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--danger);
}

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(27,25,22,0.45); z-index: 50; display: flex; align-items: flex-end; }
.modal {
  background: var(--sand-50); width: 100%; max-height: 88vh; overflow-y: auto;
  border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
}
@media (min-width: 600px) {
  .modal-bg { align-items: center; justify-content: center; }
  .modal { max-width: 480px; border-radius: var(--r-lg); }
}
.modal h2 { margin-top: 0; }
.modal .actions { display: flex; gap: 10px; margin-top: 18px; }
.modal .actions .btn { flex: 1; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: calc(76px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  background: var(--ink-900); color: var(--sand-50); border-radius: 99px;
  padding: 10px 20px; font-size: 14px; font-weight: 600; z-index: 200;
  max-width: 90vw; text-align: center;
}
.toast.err { background: var(--danger); }

/* ---------- Verwaltung ---------- */
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--sand-100); }
.row .grow { flex: 1; min-width: 0; }
.assign select { max-width: 150px; }
.chip-line { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { background: var(--sand-100); border-radius: 99px; padding: 4px 12px; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.chip button { background: none; border: none; color: var(--danger); font-weight: 800; padding: 0; }
.issue-photo img { width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--r-sm); margin-top: 10px; }
.syncline { font-size: 13px; color: var(--ink-400); margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.syncbtns { display: flex; gap: 8px; align-items: center; }

/* ---------- Kalender (Smoobu-Optik) ---------- */
.modeswitch { display: inline-flex; border: 1.5px solid var(--sand-300); border-radius: 99px; overflow: hidden; background: #fff; }
.modeswitch button { border: none; background: none; padding: 6px 13px; font-size: 13px; font-weight: 600; color: var(--ink-500); font-family: var(--font-head); }
.modeswitch button.on { background: var(--ink-900); color: var(--sand-50); }

.calwrap { overflow-x: auto; border: 1px solid var(--sand-200); border-radius: var(--r-md); background: #fff; -webkit-overflow-scrolling: touch; }
.calhead { display: flex; border-bottom: 1px solid var(--sand-300); width: max-content; background: var(--sand-50); }
.calcorner { position: sticky; left: 0; z-index: 4; width: 64px; flex: 0 0 64px; background: var(--sand-50); border-right: 1px solid var(--sand-300); }
.calday { width: 40px; flex: 0 0 40px; text-align: center; padding: 2px 0 4px; font-family: var(--font-head); }
.calday .mon { display: block; font-size: 8px; font-weight: 800; color: var(--clay-600); text-transform: uppercase; letter-spacing: 0.04em; }
.calday .dow { display: block; font-size: 9px; color: var(--ink-400); text-transform: uppercase; }
.calday .num { font-size: 13px; font-weight: 600; }
.calday.we { background: var(--sand-100); }
.calday.today .num { background: var(--clay-500); color: #fff; border-radius: 99px; display: inline-block; min-width: 20px; line-height: 20px; }

.calrow { display: flex; width: max-content; border-bottom: 1px solid var(--sand-100); }
.calrow:last-child { border-bottom: none; }
.callabel {
  position: sticky; left: 0; z-index: 3; width: 64px; flex: 0 0 64px;
  background: #fff; border-right: 1px solid var(--sand-300);
  font-family: var(--font-head); font-weight: 800; font-size: 12px;
  padding: 2px 6px; display: flex; align-items: center; flex-wrap: wrap; gap: 2px;
}
.callabel .ort { font-size: 8px; font-weight: 600; color: var(--warning); text-transform: uppercase; letter-spacing: 0.04em; width: 100%; line-height: 1; }
.calcanvas {
  position: relative; flex: 0 0 auto;
  background-image: repeating-linear-gradient(to right, transparent 0 39px, var(--sand-100) 39px 40px);
}
.calcanvas .wecol, .calcanvas .todaycol { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.calcanvas .wecol { background: rgba(232, 223, 211, 0.28); }
.calcanvas .todaycol { background: rgba(97, 116, 85, 0.10); border-left: 1.5px solid var(--clay-500); }

.calbar {
  /* Smoobu-Optik: Parallelogramm mit schrägen Enden (An-/Abreise zur Tagesmitte) */
  position: absolute; top: 2px; height: 16px; border-radius: 0;
  color: #fff; font-size: 9.5px; font-weight: 600; line-height: 16px;
  padding: 0 10px 0 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
}
.calbar.clipL { clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 100%, 0 100%); padding-left: 7px; }
.calbar.clipR { clip-path: polygon(9px 0, 100% 0, 100% 100%, 0 100%); padding-right: 7px; }
.calbar.clipL.clipR { clip-path: none; }
.calbar.chan-direct { background: var(--clay-500); }
.calbar.chan-booking { background: #5A7184; }
.calbar.chan-airbnb { background: #B4543C; }
.calbar.blocked { background: var(--sand-300); color: var(--ink-500); box-shadow: none; }

.calchip {
  position: absolute; border-radius: 99px; color: #fff;
  border: none; font-size: 9px; font-weight: 800; font-family: var(--font-head);
  display: flex; align-items: center; justify-content: center; z-index: 2;
  box-shadow: 0 1px 3px rgba(27, 25, 22, 0.25); cursor: pointer; padding: 0; line-height: 1;
}
.calchip.offen { background: #fff !important; color: var(--danger); border: 1.5px dashed var(--danger); box-shadow: none; }
.calchip.laeuft { box-shadow: 0 0 0 1.5px var(--warning), 0 1px 3px rgba(27, 25, 22, 0.25); }
.calchip.fertig { opacity: 0.6; }

.callegend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12px; color: var(--ink-500); margin-top: 10px; align-items: center; }
.callegend .sw { display: inline-block; width: 13px; height: 13px; border-radius: 4px; margin-right: 4px; vertical-align: -2px; }

/* ---------- Monatskalender (TimeTree-Optik) ---------- */
.mnav { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 10px; }
.mnav .mtitle { font-family: var(--font-head); font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.mnav button { min-width: 44px; }

.mcal { border: 1px solid var(--sand-200); border-radius: var(--r-md); overflow: hidden; background: #fff; }
.mhead { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--sand-100); border-bottom: 1px solid var(--sand-200); }
.mwd { text-align: center; font-family: var(--font-head); font-size: 11px; font-weight: 600; color: var(--ink-500); padding: 6px 0; }
.mwd.we { color: var(--warning); }
.mgrid { display: grid; grid-template-columns: repeat(7, 1fr); }
.mday {
  min-height: 76px; border-bottom: 1px solid var(--sand-100); border-right: 1px solid var(--sand-100);
  padding: 2px; cursor: pointer; overflow: hidden;
}
.mday:nth-child(7n) { border-right: none; }
.mday:active { background: var(--sand-100); }
.mday.we { background: var(--sand-50); }
.mday.out { opacity: 0.35; }
.mday .num {
  font-family: var(--font-head); font-size: 12px; font-weight: 600;
  width: 20px; line-height: 20px; text-align: center; margin: 0 auto 2px;
}
.mday.today .num { background: var(--clay-500); color: #fff; border-radius: 99px; }
.mev {
  font-size: 9px; font-weight: 700; color: #fff; border-radius: 4px;
  padding: 2px 3px; margin-top: 2px; white-space: nowrap; overflow: hidden;
  text-overflow: clip; font-family: var(--font-head); line-height: 1.25;
  letter-spacing: -0.02em;
}
.mev b { font-weight: 800; }
.mev b::before { content: '·'; font-weight: 400; opacity: 0.7; }
.mev i { font-style: normal; font-size: 7.5px; opacity: 0.9; margin-left: 2px; }
/* Farbe = welche Fee, Zustand = Rahmen/Deckkraft */
.mev.offen { background: #fff; color: var(--danger); border: 1.2px dashed var(--danger); padding: 1px 2px; }
.mev.laeuft { box-shadow: inset 0 0 0 1.5px #fff, 0 0 0 1.5px var(--warning); }
.mev.fertig { opacity: 0.55; }

.feedots { display: inline-flex; gap: 3px; vertical-align: middle; margin-left: 4px; }
.feedot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* Mehrfachauswahl der Feen */
.feepick { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.feepick label {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border: 1.5px solid var(--sand-300); border-radius: var(--r-sm); background: #fff; cursor: pointer;
}
.feepick label.on { border-color: var(--clay-500); background: var(--clay-100); }
.feepick input { width: 20px; height: 20px; accent-color: var(--clay-500); }
.feepick .dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.pushhint { background: var(--clay-100); border-color: var(--clay-200); font-size: 14px; }

/* Urlaubs-Fortschritt */
.urlaubsbalken {
  height: 8px; border-radius: 99px; background: var(--sand-200);
  overflow: hidden; margin-top: 10px;
}
.urlaubsbalken div { height: 100%; background: var(--clay-500); border-radius: 99px; }

/* ---------- PDF-Ansicht ---------- */
.topbar.pdfbar { justify-content: space-between; gap: 10px; }
.pdfwrap {
  position: fixed; left: 0; right: 0;
  top: calc(62px + env(safe-area-inset-top)); bottom: 0;
  background: var(--sand-100);
}
.pdfwrap iframe { width: 100%; height: 100%; border: none; display: block; }
.pdffallback {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  background: var(--sand-50); border-top: 1px solid var(--sand-300); text-align: center;
}
.pdffallback p { color: var(--ink-500); font-size: 14px; margin-bottom: 10px; }
.pdffallback .btn { width: 100%; }
.mev.abw {
  background: repeating-linear-gradient(45deg, var(--sand-300) 0 4px, var(--sand-200) 4px 8px);
  color: var(--ink-700); font-weight: 700;
}
.mmore { font-size: 9px; color: var(--ink-500); text-align: center; margin-top: 2px; font-weight: 700; }

/* ---------- Unterschrift ---------- */
.sigpad {
  display: block; width: 100%; height: 140px;
  border: 1.5px dashed var(--sand-300); border-radius: var(--r-sm);
  background: #fff; touch-action: none; cursor: crosshair;
}
.sigcard { text-align: center; }
.sigcard img { max-height: 120px; margin: 0 auto; border-bottom: 1px solid var(--sand-300); }

/* ---------- Arbeitszeiten ---------- */
.reptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.reptable th {
  text-align: left; font-family: var(--font-head); font-size: 11px; font-weight: 600;
  color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.05em;
  padding: 4px 6px; border-bottom: 1px solid var(--sand-200);
}
.reptable td { padding: 8px 6px; border-bottom: 1px solid var(--sand-100); }
.reptable tr:last-child td { border-bottom: none; }
