/* zunfto-mobile.css — phone shell + mobile components. Loaded after zunfto.css. */

.m-stage {
  min-height: 100vh; display: grid; place-items: center; padding: 30px 16px;
  background:
    radial-gradient(900px 600px at 50% -10%, color-mix(in oklab, var(--accent) 9%, transparent), transparent 60%),
    var(--bg);
}
.phone {
  width: 392px; height: 850px; flex: 0 0 auto;
  background: #0b0d10; border-radius: 52px; padding: 12px;
  box-shadow: 0 40px 90px rgba(0,0,0,.45), inset 0 0 0 2px rgba(255,255,255,.05);
  position: relative;
}
.phone-screen {
  width: 100%; height: 100%; background: var(--canvas); color: var(--ink);
  border-radius: 40px; overflow: hidden; position: relative;
  display: flex; flex-direction: column; font-family: var(--font-ui);
}

/* status bar */
.m-status { height: 50px; flex: 0 0 50px; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; position: relative; z-index: 5; }
.m-status .t { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.m-status .r { display: flex; align-items: center; gap: 7px; }
.m-status .r svg { width: 17px; height: 13px; }
.m-notch { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 116px; height: 30px; background: #0b0d10; border-radius: 18px; z-index: 6; }

/* screens */
.m-screens { flex: 1; position: relative; min-height: 0; }
.m-screen { position: absolute; inset: 0; display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: opacity .2s; }
.m-screen.on { opacity: 1; pointer-events: auto; }
.m-scroll { flex: 1; overflow-y: auto; padding: 4px 18px 24px; }
.m-scroll::-webkit-scrollbar { width: 0; }

/* header */
.m-head { padding: 6px 20px 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.m-head h1 { margin: 2px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.m-head .ovl { color: var(--faint); }
.m-head-btn { width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); display: grid; place-items: center; flex: 0 0 42px; cursor: pointer; position: relative; }
.m-head-btn svg { width: 20px; height: 20px; }
.m-head-btn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid var(--panel); }

/* mobile KPI strip */
.m-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 16px; }
.m-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 15px; box-shadow: var(--shadow-card); }
.m-kpi .ovl { display: block; }
.m-kpi .val { display: flex; align-items: baseline; gap: 4px; margin-top: 9px; }
.m-kpi .val b { font-size: 23px; font-weight: 800; letter-spacing: -.02em; }
.m-kpi .val .u { font-size: 13px; color: var(--muted); font-weight: 700; }
.m-kpi .val.accent b { color: var(--accent); }

/* section title */
.m-sec { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 11px; }
.m-sec h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.m-sec a { font-size: 12.5px; font-weight: 600; color: var(--accent); text-decoration: none; }

/* job card */
.m-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-card); padding: 15px 16px; margin-bottom: 11px; display: block; text-decoration: none; color: var(--ink); }
.m-card.tap:active { transform: scale(.985); }
.m-job-top { display: flex; align-items: center; gap: 9px; }
.m-job-top .time { font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.m-job-top .zt-tag { margin-left: 0; }
.m-job-top .zt-state { margin-left: auto; }
.m-job h3 { margin: 11px 0 2px; font-size: 16px; font-weight: 700; }
.m-job p { margin: 0; font-size: 13px; color: var(--muted); }
.m-job .addr { margin-top: 10px; padding-top: 11px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--faint); }
.m-job .addr svg { width: 14px; height: 14px; }
.m-job .addr .go { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-weight: 600; }

/* timeline dot for agenda */
.m-tl { position: relative; padding-left: 18px; }
.m-tl::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.m-tl .m-card { position: relative; }
.m-tl .m-card::before { content: ""; position: absolute; left: -18px; top: 20px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 4px var(--canvas); }
.m-tl .m-card.idle::before { background: var(--line-strong); box-shadow: 0 0 0 4px var(--canvas); }

/* progress */
.m-prog { height: 7px; border-radius: 999px; background: var(--input-bg); overflow: hidden; margin-top: 12px; }
.m-prog i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

/* checklist (mobile abnahme) */
.m-check { display: flex; align-items: flex-start; gap: 13px; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.m-check:first-child { border-top: none; }
.m-check .box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line-strong); flex: 0 0 26px; display: grid; place-items: center; color: transparent; margin-top: 1px; transition: .12s; }
.m-check.ok .box { background: var(--good); border-color: transparent; color: #fff; }
.m-check .box svg { width: 15px; height: 15px; }
.m-check b { font-size: 15px; font-weight: 600; }
.m-check p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }

/* mobile photo grid */
.m-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.m-photo { aspect-ratio: 1; border-radius: 13px; border: 1px solid var(--line); position: relative; overflow: hidden;
  background: repeating-linear-gradient(135deg, var(--input-bg) 0 8px, var(--panel-soft) 8px 16px); }
.m-photo.add { border-style: dashed; display: grid; place-items: center; color: var(--muted); }
.m-photo.add svg { width: 24px; height: 24px; }

/* bottom action bar */
.m-cta { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--panel); display: flex; gap: 10px; }
.m-btn { flex: 1; height: 52px; border-radius: 15px; border: none; font-family: var(--font-ui); font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer; }
.m-btn svg { width: 19px; height: 19px; }
.m-btn--primary { background: var(--accent); color: var(--accent-ink); }
.m-btn--ghost { flex: 0 0 auto; padding: 0 20px; background: var(--input-bg); color: var(--ink); border: 1px solid var(--line); }

/* tab bar */
.m-tabbar { height: 76px; flex: 0 0 76px; display: flex; border-top: 1px solid var(--line); background: var(--panel); padding-bottom: env(safe-area-inset-bottom); }
.m-tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: none; background: transparent; cursor: pointer; color: var(--faint); font-family: var(--font-ui); font-size: 10.5px; font-weight: 600; }
.m-tab svg { width: 23px; height: 23px; }
.m-tab.on { color: var(--accent); }
.m-tab .nb { position: relative; }
.m-tab .nb::after { content: attr(data-badge); position: absolute; top: -4px; right: -9px; background: var(--accent); color: #fff; font-size: 9px; font-weight: 700; min-width: 15px; height: 15px; border-radius: 8px; display: grid; place-items: center; padding: 0 3px; }

/* signature sheet */
.m-sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: .22s; z-index: 20; }
.m-sheet-bg.on { opacity: 1; pointer-events: auto; }
.m-sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--panel); border-radius: 26px 26px 0 0; transform: translateY(100%); transition: transform .26s cubic-bezier(.2,.8,.2,1); z-index: 21; padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); }
.m-sheet.on { transform: translateY(0); }
.m-sheet .grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 4px auto 14px; }
.m-sheet h2 { margin: 0 0 3px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.m-sheet .ovl { display: block; margin-bottom: 14px; }
.m-sigcanvas-wrap { position: relative; border: 1.5px dashed var(--line-strong); border-radius: 16px; background: var(--input-bg); overflow: hidden; height: 200px; }
.m-sigcanvas-wrap canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.m-sigcanvas-wrap .ph { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; color: var(--faint); font-size: 14px; }
.m-sigcanvas-wrap .ph.hide { display: none; }
.m-sigcanvas-wrap .baseline { position: absolute; left: 22px; right: 22px; bottom: 42px; border-bottom: 1px solid var(--line-strong); }
.m-sigcanvas-wrap .x { position: absolute; left: 24px; bottom: 24px; font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.m-sig-meta { display: flex; align-items: center; justify-content: space-between; margin: 14px 2px 16px; }
.m-sig-meta b { font-size: 14px; font-weight: 700; display: block; }
.m-sig-meta span { font-size: 12px; color: var(--muted); }
.m-sheet-actions { display: flex; gap: 11px; }

/* confirmation toast */
.m-done { position: absolute; inset: 0; background: var(--canvas); z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; opacity: 0; pointer-events: none; transition: .3s; padding: 40px; text-align: center; }
.m-done.on { opacity: 1; pointer-events: auto; }
.m-done .ring { width: 92px; height: 92px; border-radius: 50%; background: var(--good-soft); display: grid; place-items: center; color: var(--good); }
.m-done .ring svg { width: 46px; height: 46px; }
.m-done h2 { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -.02em; }
.m-done p { margin: 0; font-size: 14px; color: var(--muted); max-width: 240px; line-height: 1.5; }

/* small theme toggle pill on stage */
.m-themepill { position: fixed; top: 20px; right: 20px; z-index: 50; }
