/* Technik Portal – App (Handy und iPad). Grundlage: design.css */

body { padding-left: env(safe-area-inset-left, 0); padding-right: env(safe-area-inset-right, 0); }
.wrap { max-width: 780px; margin: 0 auto; padding: 0 16px; }
.has-bar .wrap { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.no-bar .wrap { padding-bottom: 48px; }

/* ---------- Kopfzeile ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--navy); color: var(--on-navy); padding-top: env(safe-area-inset-top); }
.top-in { max-width: 780px; margin: 0 auto; padding: 8px 12px; display: flex; align-items: center; gap: 10px; min-height: 60px; }
.top h1 { font-size: 18px; font-weight: 700; letter-spacing: 0; }
.top small { display: block; opacity: .72; font-size: 12px; font-weight: 500; margin-top: 1px; }
.top .grow { flex: 1; min-width: 0; }
.top .grow > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo-mark {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center; overflow: hidden;
  border: 1.5px solid var(--sky); color: var(--sky); font-weight: 800; letter-spacing: -.04em; border-radius: var(--r);
}
.logo-mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 2px; }
.icon-btn { width: 44px; height: 44px; flex: none; display: inline-grid; place-items: center; border: 0; background: transparent; color: inherit; border-radius: var(--r); cursor: pointer; }
.icon-btn:hover, .icon-btn:active { background: rgba(255, 255, 255, .14); }
.ic-w { display: inline-grid; place-items: center; line-height: 0; }
.save-state { font-size: 12px; opacity: .8; white-space: nowrap; }

.off-strip { display: none; align-items: center; gap: 10px; background: #f5d9a6; color: #3d2a00; padding: 10px 16px; font-size: 14px; border-bottom: 1px solid #d9b46a; }
body.is-off .off-strip { display: flex; }
.off-strip b { background: #3d2a00; color: #f5d9a6; border-radius: 999px; padding: 1px 10px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Startseite ---------- */
.hero { background: var(--navy); color: var(--on-navy); padding: 20px 0 26px; }
.hero .wrap { padding-bottom: 0 !important; }
.hero .kicker { color: var(--sky); }
.hero h2 { font-size: clamp(28px, 6vw, 38px); line-height: 1.1; font-weight: 700; margin: 10px 0 6px; max-width: 14em; }
.hero p { opacity: .8; max-width: 32em; font-size: 15px; }

.sync { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; background: var(--bg); }
.hero .sync { background: transparent; border-color: rgba(255, 255, 255, .25); color: #fff; }
.sync .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--na); flex: none; }
.sync.ok .dot { background: #5fd08d; }
.sync.warn .dot { background: #f0b73e; }
.sync.bad .dot { background: var(--bad); }
.sync .txt { flex: 1; min-width: 0; }
.sync .txt small { display: block; opacity: .75; }
.sync .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }
.hero .sync .btn { color: #fff; border-color: var(--sky); }
.hero .sync .btn:hover { background: rgba(255, 255, 255, .12); }

.home-cols { display: grid; gap: 0; }
@media (min-width: 900px) {
  .wrap.wide { max-width: 1180px; padding-left: 28px; padding-right: 28px; }
  .home-cols { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 44px; }
  .top-in.wide { max-width: 1180px; padding-left: 28px; padding-right: 28px; }
}

.lead { display: flex; justify-content: space-between; align-items: baseline; margin: 28px 0 12px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.lead .kicker { margin-bottom: 4px; }

.new-grid { display: grid; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.new-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; text-align: left; position: relative;
  padding: 16px; background: var(--bg); border: 0; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 84px;
}
.new-card:last-child { border-bottom: 0; }
.new-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.new-card::after { content: "→"; color: var(--link); font-weight: 700; }
.new-card:hover { background: var(--surface); }
.new-card .disc { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.new-card strong { display: block; font-size: 17px; }
.new-card span.d { display: block; color: var(--muted); font-size: 14px; }

.tools { display: flex; gap: 8px; align-items: center; margin: 0 0 8px; flex-wrap: wrap; }
.tools input[type=search] { flex: 1 1 180px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font-weight: 600; }
.chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }

.list { display: grid; }
.rc { display: block; padding: 14px 0 14px 14px; border-bottom: 1px solid var(--line); border-left: 4px solid var(--c); color: var(--fg); margin-top: 0; }
.rc:hover { background: var(--surface); }
.rc-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.rc-k { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-d { font-size: 13px; color: var(--muted); white-space: nowrap; padding-right: 4px; }
.rc-b { display: flex; gap: 8px; align-items: center; margin-top: 5px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.rc .pill:first-child { --c: var(--c); }
.empty { color: var(--muted); text-align: center; padding: 28px 8px; }
.foot-note { color: var(--muted); font-size: 13px; text-align: center; margin: 26px 0 0; }
.hist-i { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.hist-i:last-child { border-bottom: 0; }
.hint { font-size: 13px; color: var(--muted); border-left: 3px solid var(--sky); padding-left: 12px; margin-top: 4px; }

/* Termine: Datumsstapel wie im Magazinraster */
.termine { margin-bottom: 8px; }
.t-day { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin: 14px 0 0; }
.t-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 12px 0; color: var(--fg); cursor: pointer; }
.t-item:hover { background: var(--surface); }
.t-item.done { opacity: .6; }
.t-time { text-align: center; line-height: 1.1; background: var(--tint); border-radius: var(--r); padding: 7px 0; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; border-top: 3px solid var(--c, var(--blue)); }
.t-time small { display: block; font-weight: 600; color: var(--muted); font-size: 11px; margin-top: 2px; }
.t-main { min-width: 0; }
.t-main strong, .t-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-main small { color: var(--muted); font-size: 13px; }
.t-ok { color: var(--ok); font-size: 20px; font-weight: 700; }
.dlg-in .kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.dlg-in .kv span { color: var(--muted); font-size: 13px; font-weight: 600; }

/* ---------- Formular ---------- */
.banner { margin: 14px 0 0; padding: 10px 14px; border-radius: var(--r); font-size: 14px; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); font-weight: 700; border-left: 4px solid var(--ok); }
.form-h { padding: 18px 0 6px; }
.form-h h2 { font-size: 26px; margin: 6px 0 2px; }
.form-h .nr { color: var(--muted); font-size: 14px; }
.progress { height: 4px; background: var(--line); margin: 14px 0 2px; border-radius: 2px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--blue); width: 0; transition: width .25s; }

details.sec { border-bottom: 1px solid var(--line); background: none; }
details.sec > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 60px; font-weight: 700; font-size: 18px; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary .sec-t { flex: 1; }
details.sec > summary .chev { display: none; }
details.sec > summary::after { content: "+"; font-size: 26px; font-weight: 400; color: var(--link); width: 24px; text-align: center; }
details.sec[open] > summary::after { content: "–"; }
.cnt { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface); color: var(--muted); }
.cnt.has-bad, .cnt.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.cnt.all-ok, .cnt.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.sec-body { padding: 2px 0 24px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; }
.field { min-width: 0; }
.field.w2 { grid-column: 1 / -1; }
.req { color: var(--bad); font-style: normal; margin-left: 3px; }
.inp-wrap { position: relative; }
.inp-wrap input { padding-right: 52px; }
.unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.computed { min-height: 48px; display: flex; align-items: center; padding: 0 12px; background: var(--tint); color: var(--link); font-weight: 800; border-radius: var(--r); border-left: 4px solid var(--blue); }
.invalid input, .invalid select, .invalid textarea { border-color: var(--bad); }
.invalid > label, .invalid > .lbl { color: var(--bad); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.seg-b { min-height: 46px; padding: 0 8px; border: 0; border-right: 1px solid var(--line); background: var(--bg); color: var(--muted); font-weight: 700; cursor: pointer; }
.seg-b:last-child { border-right: 0; }
.seg-b.on { color: #fff; background: var(--blue); }
.seg-b.on.s-ok { background: var(--ok); }
.seg-b.on.s-bad { background: var(--bad); }
.seg-b.on.s-na { background: var(--na); }

.checks-head { display: flex; justify-content: flex-end; margin-bottom: 4px; }
.chk { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.chk:first-of-type { border-top: 0; }
.chk-l { font-size: 15px; }
@media (min-width: 620px) { .chk { grid-template-columns: 1fr 260px; align-items: center; } }

/* Material */
.mat-row { display: grid; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); grid-template-columns: 1fr 84px 70px 44px; grid-template-areas: "bez bez bez del" "art menge einh scan"; }
.mat-row:first-child { border-top: 0; padding-top: 0; }
.mat-row .m-bez { grid-area: bez; } .mat-row .m-art { grid-area: art; } .mat-row .m-menge { grid-area: menge; } .mat-row .m-einh { grid-area: einh; }
.mat-row .m-del { grid-area: del; align-self: center; color: var(--bad); }
.mat-row .m-del:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.mat-row input { min-height: 44px; padding: 8px 10px; }
.mat-add { margin-top: 10px; }

/* Fotos mit Markierung */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 10px; }
.ph { position: relative; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.ph img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; cursor: pointer; }
.ph input { border: 0; border-top: 1px solid var(--line); border-radius: 0; min-height: 44px; font-size: 14px; }
.ph .ph-x { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.ph .ph-ed { position: absolute; top: 6px; left: 6px; min-height: 0; height: 30px; padding: 0 10px; border-radius: 999px; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.anno-tools { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.anno-tools .btn[aria-pressed="true"] { background: var(--blue); color: #fff; }
.anno-cv { display: block; width: 100%; height: auto; touch-action: none; border: 1px solid var(--line); border-radius: var(--r); background: #000; cursor: crosshair; }
dialog.dlg.big { width: min(900px, calc(100% - 24px)); }

/* Unterschrift */
.sig-box { margin-top: 16px; }
.sig-box:first-child { margin-top: 0; }
.sig-wrap { position: relative; border: 1px dashed var(--muted); border-radius: var(--r); background: #fff; }
canvas.sig { display: block; width: 100%; height: auto; aspect-ratio: 700 / 260; touch-action: none; cursor: crosshair; }
.sig-hint { position: absolute; left: 14px; bottom: 8px; font-size: 12px; color: #6b7c89; pointer-events: none; }
.sig-clear { position: absolute; right: 8px; top: 8px; background: #fff; color: #004262; }

/* Diktat */
.micwrap { position: relative; }
.micwrap textarea { padding-right: 64px; min-height: 120px; }
.mic { position: absolute; right: 10px; top: 10px; width: 46px; height: 46px; min-height: 0 !important; border-radius: 50%; border: 1.5px solid var(--blue); background: var(--bg); color: var(--link); cursor: pointer; display: grid; place-items: center; padding: 0; }
.mic.rec { background: var(--bad); border-color: var(--bad); color: #fff; }

/* Unterer Balken */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--bg); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.bar-in { max-width: 780px; margin: 0 auto; display: flex; gap: 10px; }
.bar .btn { flex: 1; }
.actions { display: grid; gap: 10px; margin-top: 24px; }
@media (min-width: 620px) { .actions { grid-template-columns: repeat(3, 1fr); } }

#toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: var(--r); border-left: 4px solid var(--sky); font-size: 14px; max-width: calc(100% - 32px); opacity: 0; pointer-events: none; transition: .2s; z-index: 60; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.no-bar #toast { bottom: 28px; }

/* Kundenvorschläge */
.suggest { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 8px 24px rgba(0, 0, 0, .22); max-height: 280px; overflow: auto; }
.suggest button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 12px; color: var(--fg); cursor: pointer; }
.suggest button:hover { background: var(--surface); }
.suggest button span { display: block; font-size: 13px; color: var(--muted); }

/* ---------- Drei-Spalten-Formular (iPad quer / Desktop) ---------- */
.panes { display: block; }
.pane-nav, .pane-sum { display: none; }
@media (min-width: 900px) {
  .has-bar .wrap.wide { padding-bottom: 48px; }
  .has-bar .bar { display: none; }
  .panes { display: grid; grid-template-columns: 230px minmax(0, 1fr) 310px; gap: 0; margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r); min-height: 640px; }
  .pane-nav { display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--surface); padding: 16px 0; }
  .pane-nav .kicker { padding: 0 18px 10px; }
  .pn-b { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 0 18px; min-height: 58px; font-weight: 600; font-size: 16px; cursor: pointer; border-left: 4px solid transparent; }
  .pn-b:hover { background: var(--tint); }
  .pn-b[aria-current="true"] { background: var(--bg); border-left-color: var(--blue); color: var(--link); font-weight: 700; }
  .pn-b .t { flex: 1; }
  .panes form.form { padding: 22px 28px 30px; min-width: 0; }
  .panes details.sec { border-bottom: 0; }
  .panes details.sec > summary { pointer-events: none; font-size: 24px; min-height: 0; padding-bottom: 14px; }
  .panes details.sec > summary::after { display: none; }
  .panes details.sec:not([data-active]) { display: none; }
  .panes details.sec .grid { gap: 20px 18px; }
  .panes input[type=text], .panes input[type=tel], .panes input[type=number], .panes input[type=date], .panes input[type=time], .panes input[type=email], .panes select { min-height: 56px; font-size: 17px; padding: 12px 14px; }
  .panes .computed { min-height: 56px; font-size: 20px; }
  .panes .seg-b { min-height: 54px; font-size: 16px; }
  .pane-sum { display: flex; flex-direction: column; gap: 16px; border-left: 1px solid var(--line); padding: 22px 20px; }
  .pane-sum h3 { font-size: 18px; }
  .pane-sum .btn { min-height: 56px; font-size: 17px; }
  .pane-sum .acts { margin-top: auto; display: grid; gap: 10px; }
}
.todo { border: 1px solid var(--line); border-radius: var(--r); }
.todo h4 { margin: 0; padding: 10px 14px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.todo button { display: flex; justify-content: space-between; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 12px 14px; min-height: 50px; cursor: pointer; font-weight: 600; }
.todo button:last-child { border-bottom: 0; }
.todo button::after { content: "→"; color: var(--link); }
.todo button:hover { background: var(--surface); }
.todo.done { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.todo .okline { padding: 12px 14px; color: var(--ok); font-weight: 700; }
.sum-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.sum-row span:first-child { color: var(--muted); }
.big { background: var(--tint); border-left: 4px solid var(--blue); padding: 12px 16px; border-radius: var(--r); }
.big small { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.big b { display: block; font-size: 28px; line-height: 1.2; color: var(--link); }
/* Handy: Pflichtliste im Formular */
.todo-m { margin: 14px 0 0; }
@media (min-width: 900px) { .todo-m { display: none; } }

/* ---------- Anmeldung, Dialog, Einstellungen ---------- */
.login { max-width: 420px; margin: 0 auto; padding: 36px 16px; }
.login .logo-big { display: block; max-height: 72px; max-width: 220px; margin: 8px auto 18px; object-fit: contain; }
.login .logo-mark.big { width: 64px; height: 64px; font-size: 26px; margin: 8px auto 18px; border-color: var(--blue); color: var(--blue); }
.login h2 { text-align: center; font-size: 28px; margin-bottom: 4px; }
.login p.sub { text-align: center; color: var(--muted); margin: 0 0 24px; }
.login .field { margin-bottom: 14px; }
.err { color: var(--bad); font-size: 14px; min-height: 20px; margin: 4px 0 12px; }

.logo-prev { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.logo-prev .box { min-width: 120px; min-height: 64px; padding: 8px; border: 1px dashed var(--line); border-radius: var(--r); background: #fff; display: grid; place-items: center; color: #6b7c89; font-size: 13px; }
.logo-prev img { max-height: 60px; max-width: 200px; display: block; }

dialog.dlg { border: 0; border-radius: var(--r); padding: 0; width: min(460px, calc(100% - 24px)); background: var(--bg); color: var(--fg); box-shadow: 0 12px 48px rgba(0, 0, 0, .35); border-top: 4px solid var(--blue); }
dialog.dlg::backdrop { background: rgba(0, 0, 0, .5); }
.dlg-in { padding: 20px; display: grid; gap: 14px; }
.dlg-in h2 { font-size: 20px; }
.dlg-row { display: flex; gap: 10px; flex-wrap: wrap; }
.dlg-row .btn { flex: 1; }
.chk-line { display: flex; gap: 10px; align-items: center; font-size: 15px; font-weight: 400; color: var(--fg); }
.chk-line input { width: 22px; height: 22px; min-height: 0; accent-color: var(--blue); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.set-row small { display: block; color: var(--muted); font-size: 13px; }
.set-row .seg { min-width: 220px; }

@media print {
  html, body { background: #fff !important; }
  .no-print, .top, .bar, #toast, .off-strip { display: none !important; }
  .wrap { max-width: none; padding: 0 !important; }
}
.cnt:empty { display: none; }
.anno-cv { max-height: 62vh; width: auto; max-width: 100%; margin: 0 auto; }

/* ---------- Telefonfall: Gespräche, Seriennummer-Eingang, Sachkunde, Hinweise ---------- */
.calls { display: grid; gap: 10px; }
.call-row { border: 1px solid var(--line); border-radius: var(--r); padding: 10px; background: var(--surface); display: grid; gap: 8px; }
.call-main { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.call-main label { display: grid; gap: 4px; margin: 0; }
.call-main .c-date { width: 11em; } .call-main .c-time { width: 7.5em; }
.call-dur { font-weight: 700; color: var(--blue); min-width: 4.5em; padding-bottom: 10px; }
.call-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.call-sub .c-note { flex: 1 1 14em; min-width: 0; }
.call-sub small { color: var(--muted); }
.call-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.call-total { font-weight: 700; }
.btn.small { min-height: 34px; padding: 4px 12px; font-size: 14px; }
.snbox { margin-bottom: 18px; }
.sn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sn-row input { flex: 1 1 14em; min-width: 0; }
.sn-ok { font-weight: 700; color: var(--ok); margin: 0 0 8px; }
.pruef { margin: 10px 0 0; padding: 8px 12px; border-radius: var(--r); border-left: 4px solid var(--na); background: var(--surface); font-weight: 600; }
.pruef.ueberfaellig { border-color: var(--bad); color: var(--bad); } .pruef.bald, .pruef.offen { border-color: var(--warn); color: var(--warn); } .pruef.ok { border-color: var(--ok); color: var(--ok); }
b.pruef { display: inline; margin: 0; padding: 0; border: 0; background: none; }
.sn-hint { margin-top: 6px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cert-warn { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--r); font-weight: 700; border-left: 4px solid var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); grid-column: 1 / -1; }
.cert-warn.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.banner.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); border-color: var(--warn); }
.hint.warnline { color: var(--bad); border-color: var(--bad); font-weight: 700; }
.scan-video { width: 100%; max-height: 60vh; background: #000; border-radius: var(--r); }
.dlg-row { flex-wrap: wrap; }

/* ---------- Untere Tab-Leiste der Startseite: Start · Berichte · Termine · Konto ---------- */
.tabbar { display: none; }
.has-tabs #app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.has-tabs #app > * { width: 100%; box-sizing: border-box; flex: none; }
.has-tabs #app > main { flex: 1 0 auto; }
.has-tabs .tabbar { display: flex; position: sticky; bottom: 0; margin-top: auto; z-index: 30; background: var(--bg); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.tabbar button[aria-current="true"], .tabbar .tab-b[aria-current="true"] { color: var(--link); box-shadow: inset 0 3px 0 var(--link); }
.tabbar .tab-b { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; color: var(--muted); font-size: 12px; font-weight: 600; text-decoration: none; }
.tabbar .tab-b .dot { position: absolute; top: 10px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--warn, #c2410c); }
.lead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.lead .more { font-size: 14px; font-weight: 600; color: var(--link); text-decoration: none; }
.has-tabs .wrap { padding-bottom: 28px; }
.has-tabs #toast { bottom: calc(76px + env(safe-area-inset-bottom)); }

/* ---------- Artikelsuche, Textbausteine, Wissensvorschläge ---------- */
.mat-row { position: relative; }
.mat-row .suggest { top: 52px; }
.tpl-sel { margin-top: 6px; width: 100%; min-height: 44px; }
.kb-box { margin-top: 10px; border: 1px solid var(--line); border-left: 4px solid var(--sky, #3b82c4); border-radius: var(--r); padding: 10px 12px; background: var(--surface); }
.kb-h { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.kb-i summary { cursor: pointer; padding: 8px 0; font-weight: 600; }
.kb-i small { color: var(--muted); font-weight: 400; }
.kb-t p { margin: 4px 0; white-space: pre-wrap; }
.kb-i .btn { margin: 6px 0 10px; }
.kb-code { border-left-color: var(--ok, #2e9b5f); }
.kb-code-i { padding: 6px 0 4px; border-top: 1px solid var(--line); }
.kb-code-i:first-of-type { border-top: 0; }
.kb-code-t small { color: var(--muted); }
.kb-code-i p { margin: 4px 0; white-space: pre-wrap; }
.kb-code-i .btn { margin: 6px 0 4px; }
.kb-none { color: var(--muted); font-size: 14px; }
.war-box { margin-top: 6px; padding: 8px 10px; border-radius: var(--r); font-size: .9rem; border: 1px solid var(--line); }
.war-box.ok { border-left: 4px solid #2e7d32; }
.war-box.bad { border-left: 4px solid #c2410c; background: rgba(194,65,12,.06); }
.war-box[hidden] { display: none; }

/* Berichte und Termine: volle Breite, Berichtskarten im Raster */
.wrap.full { max-width: none; }
@media (min-width: 700px) { .wrap.full { padding-left: 28px; padding-right: 28px; } .wrap.full .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; } }
.top-in.full { max-width: none; }

/* ===== iPad-Design (nur iPad / Tablet-Modus; Klasse body.ipad wird per Skript gesetzt) ===== */
body.ipad.has-bar .wrap.wide { padding-bottom: 48px; }
body.ipad.has-bar .bar { display: none; }
body.ipad .panes { display: grid; grid-template-columns: 230px minmax(0, 1fr) 310px; gap: 0; margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r); min-height: 640px; }
body.ipad .pane-nav { display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--surface); padding: 16px 0; }
body.ipad .pane-nav .kicker { padding: 0 18px 10px; }
body.ipad .pn-b { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 0 18px; min-height: 58px; font-weight: 600; font-size: 16px; cursor: pointer; border-left: 4px solid transparent; }
body.ipad .pn-b:hover { background: var(--tint); }
body.ipad .pn-b[aria-current="true"] { background: var(--bg); border-left-color: var(--blue); color: var(--link); font-weight: 700; }
body.ipad .pn-b .t { flex: 1; }
body.ipad .panes form.form { padding: 22px 28px 30px; min-width: 0; }
body.ipad .panes details.sec { border-bottom: 0; }
body.ipad .panes details.sec > summary { pointer-events: none; font-size: 24px; min-height: 0; padding-bottom: 14px; }
body.ipad .panes details.sec > summary::after { display: none; }
body.ipad .panes details.sec:not([data-active]) { display: none; }
body.ipad .panes details.sec .grid { gap: 20px 18px; }
body.ipad .panes input[type=text], body.ipad .panes input[type=tel], body.ipad .panes input[type=number], body.ipad .panes input[type=date], body.ipad .panes input[type=time], body.ipad .panes input[type=email], body.ipad .panes select { min-height: 56px; font-size: 17px; padding: 12px 14px; }
body.ipad .panes .computed { min-height: 56px; font-size: 20px; }
body.ipad .panes .seg-b { min-height: 54px; font-size: 16px; }
body.ipad .pane-sum { display: flex; flex-direction: column; gap: 16px; border-left: 1px solid var(--line); padding: 22px 20px; }
body.ipad .pane-sum h3 { font-size: 18px; }
body.ipad .pane-sum .btn { min-height: 56px; font-size: 17px; }
body.ipad .pane-sum .acts { margin-top: auto; display: grid; gap: 10px; }
body.ipad .todo-m { display: none; }
body.ipad { font-size: 17px; }
body.ipad input[type=text], body.ipad input[type=tel], body.ipad input[type=number], body.ipad input[type=date], body.ipad input[type=time], body.ipad input[type=email], body.ipad input[type=search], body.ipad select { min-height: 56px; font-size: 17px; padding: 12px 14px; }
body.ipad .btn { min-height: 54px; font-size: 17px; }
body.ipad .chip { min-height: 44px; font-size: 15px; }
body.ipad .wrap.wide, body.ipad .top-in.wide { max-width: none; padding-left: 28px; padding-right: 28px; }
/* Seitenleiste nur im Querformat; hochkant bleibt die untere Leiste */
@media (orientation: landscape) {
  body.ipad.has-tabs #app { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-content: start; min-height: 100vh; min-height: 100dvh; }
  body.ipad.has-tabs #app > * { grid-column: 2; width: 100%; min-width: 0; }
  body.ipad.has-tabs #app > .tabbar { grid-column: 1; grid-row: 1 / span 12; position: sticky; top: 0; bottom: auto; height: 100vh; height: 100dvh; margin: 0; flex-direction: column; justify-content: flex-start; padding: 12px 0; border-top: 0; border-right: 1px solid var(--line); background: var(--surface); }
  body.ipad .tabbar .tab-b { flex: none; min-height: 84px; border-left: 4px solid transparent; font-size: 13px; }
  body.ipad .tabbar .tab-b[aria-current="true"] { box-shadow: none; border-left-color: var(--blue); background: var(--bg); }
  body.ipad .tabbar .tab-b .dot { top: 14px; left: calc(50% + 12px); }
}
body.ipad .tabbar .tab-b { min-height: 68px; }
/* Formular: Abschnitte links, Zusammenfassung unten (hochkant) bzw. rechts (quer) */
body.ipad .panes { grid-template-columns: 210px minmax(0, 1fr); }
body.ipad .pane-sum { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px; border-left: 0; border-top: 1px solid var(--line); padding: 14px 20px; }
body.ipad .pane-sum .acts { margin-top: 0; grid-auto-flow: column; }
body.ipad .pane-sum .todo { flex: 1 1 260px; }
body.ipad .pane-sum .sum-row, body.ipad .pane-sum .big { display: none; }
@media (min-width: 1180px) {
  body.ipad .panes { grid-template-columns: 230px minmax(0, 1fr) 310px; }
  body.ipad .pane-sum { grid-column: auto; flex-direction: column; flex-wrap: nowrap; align-items: stretch; border-top: 0; border-left: 1px solid var(--line); padding: 22px 20px; }
  body.ipad .pane-sum .acts { margin-top: auto; grid-auto-flow: row; }
  body.ipad .pane-sum .sum-row { display: flex; } body.ipad .pane-sum .big { display: block; }
}
@media (min-width: 1000px) { body.ipad .home-cols { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 36px; } }
/* Berichte: Liste links, Details rechts */
.md-wrap { display: grid; grid-template-columns: minmax(340px, 2fr) 3fr; gap: 28px; align-items: start; }
.md-wrap .list { grid-template-columns: 1fr !important; }
.md-r { position: sticky; top: 84px; border: 1px solid var(--line); border-radius: var(--r); padding: 24px 28px; background: var(--bg); min-height: 280px; }
.rc.sel { outline: 2px solid var(--blue); outline-offset: -2px; background: var(--tint); }
body.ipad .pane-sum > h3 { display: none; }
@media (min-width: 1180px) { body.ipad .pane-sum > h3 { display: block; } }
body.ipad .wrap.full .termine { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 0 28px; align-content: start; }
body.ipad .wrap.full .termine .t-day { grid-column: 1 / -1; }

/* Material-Scan, Zuletzt verwendet, Foto-Schnellbeschriftung */
.mat-row .m-scan { grid-area: scan; align-self: center; color: var(--link); }
.mat-quick, .ph-q { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.ph-q { margin: 4px 0 0; } .ph-q .chip { min-height: 32px; padding: 3px 10px; font-size: 13px; }
/* Einsatz-Stoppuhr */
.clock { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--blue) 5%, var(--bg)); }
.clock-s { font-weight: 600; }
/* Übergabe */
.ho-log { margin-top: 12px; display: grid; gap: 8px; }
.ho-row { padding: 8px 10px; border-left: 3px solid var(--line); background: color-mix(in srgb, var(--line) 25%, transparent); border-radius: 6px; }
.ho-row.frei { border-left-color: var(--bad); } .ho-row.uebernommen { border-left-color: var(--ok, #2f855a); }
.ho-row small { margin-left: 8px; opacity: .7; } .ho-row p { margin: 4px 0 0; white-space: pre-wrap; }
.ho-banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; } .ho-banner p { margin: 4px 0 0; white-space: pre-wrap; }
/* Hinweise vor dem Abschluss, Tagesroute */
.hint-list { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.hint-list button { background: none; border: 0; padding: 0; text-align: left; color: var(--link); text-decoration: underline; font: inherit; cursor: pointer; }
.route-list { margin: 8px 0; padding-left: 22px; display: grid; gap: 8px; } .route-list small { display: block; opacity: .7; }
.btn.anfahrt { margin-top: 6px; }
.route-list .leg { color: var(--muted); } .route-list .leg.bad { color: var(--bad); font-weight: 600; opacity: 1; }

.model-box { border-left-color: var(--sky, #3b82c4); }
.code-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.code-chips .chip { border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 999px; padding: 8px 14px; font-weight: 600; cursor: pointer; min-height: 40px; }
.code-chips .chip:hover { background: var(--surface); }

[data-fk][hidden], details.sec[hidden], .pn-b[hidden] { display: none !important; }
.sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sugg[hidden] { display: none; }
.sugg-chip { min-height: 38px; padding: 6px 14px; border-color: var(--sky, #3b82c4); color: var(--fg); font-size: 14px; }
.hist-box { border-left-color: var(--warn, #d98a1b); }
.hist-warn { margin: 4px 0 8px; padding: 8px 10px; border-radius: var(--r); background: rgba(217, 138, 27, .14); font-weight: 600; font-size: 14px; }
.hist-box .hist-i { padding: 6px 0; border-top: 1px solid var(--line); }
.hist-box .pill { margin-left: 8px; }

.phones { margin-top: 8px; }
.ph-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.ph-chips[hidden], .ph-add[hidden], .ph-call[hidden] { display: none; }
.ph-chip { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); overflow: hidden; }
.ph-chip.on { border-color: var(--sky, #3b82c4); background: rgba(59, 130, 196, .14); }
.ph-pick { display: flex; flex-direction: column; align-items: flex-start; text-align: left; background: none; border: 0; color: var(--fg); padding: 6px 8px 6px 14px; min-height: 44px; cursor: pointer; line-height: 1.2; }
.ph-pick small { color: var(--muted); font-size: 12px; }
.ph-del { background: none; border: 0; color: var(--muted); padding: 0 12px; font-size: 20px; cursor: pointer; min-width: 40px; }
.ph-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ph-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ph-add input { flex: 1 1 160px; min-width: 0; }
.ph-add select { flex: 0 0 auto; }

.kb-flow { margin: 4px 0 2px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); }
.kb-flow summary { cursor: pointer; padding: 10px 12px; font-weight: 600; }
.kb-flow .kb-t { padding: 0 12px 10px; font-size: 14px; white-space: pre-wrap; }

dialog.dlg-kb { width: min(760px, calc(100% - 24px)); max-height: calc(100% - 24px); }
.dlg-kb .dlg-in { max-height: calc(100vh - 48px); overflow: auto; }
.kb-dlg { display: grid; gap: 10px; }
.kb-dlg input[type=search] { width: 100%; }
.kb-scope { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.kb-res .kb-code-i { padding: 10px 0; }
.kb-open { margin-top: 8px; }
.kb-home { margin: 10px 0 14px; }
.doc-open { margin-top: 6px; }
.doc-list { display: grid; gap: 4px; max-height: 55vh; overflow: auto; }
.doc-row { display: grid; gap: 1px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: inherit; }
.doc-row small { color: var(--muted, #667); }

/* Anfahrt-Timer auf der Startseite */
.anf-card { margin-top: 16px; display: flex; align-items: center; gap: 14px; width: 100%; margin-bottom: 14px; padding: 14px 16px; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--r); position: relative; }
.anf-card::after { content: "→"; margin-left: auto; color: var(--link); font-weight: 700; }
.anf-card:hover { background: var(--surface); }
.anf-card .disc { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, transparent); }
.anf-txt strong { display: block; font-size: 17px; }
.anf-txt .d { display: block; color: var(--muted); font-size: 14px; }
.anf-wrap { margin: 16px 0 14px; display: grid; gap: 10px; }
.anf-run { padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--r); background: var(--bg); }
.anf-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.anf-who { display: block; font-size: 18px; }
.anf-time { font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: var(--blue); }
.anf-time small { font-size: 14px; font-weight: 600; color: var(--muted); }
.anf-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.anf-step { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.anf-step i { display: block; height: 4px; border-radius: 2px; background: var(--line); }
.anf-step.done { color: var(--fg); }
.anf-step.done i { background: var(--blue); }
.anf-step.now { color: var(--blue); }
.anf-step.now i { background: linear-gradient(90deg, var(--blue) 60%, var(--line) 60%); }
.anf-since { margin: 8px 0 0; font-size: 13px; color: var(--muted); border: 0; padding: 0; background: none; }
.anf-run .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.anf-run .actions .btn.primary { grid-column: 1 / -1; }

.anf-list { display: grid; gap: 6px; margin-top: 4px; max-height: 60vh; overflow: auto; }
.anf-grp { margin-top: 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.anf-grp:first-child { margin-top: 0; }
.anf-opt { display: grid; gap: 2px; width: 100%; padding: 10px 14px; text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); }
.anf-opt:hover { background: var(--surface); border-color: var(--blue); }
.anf-opt strong { font-size: 16px; }
.anf-opt small { color: var(--muted); font-size: 13px; white-space: pre-wrap; }
.anf-new { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Feedback */
.fb-row{padding:8px 0;border-top:1px solid var(--line,#dde2e0);font-size:14px}
.fb-st{margin-left:8px;font-size:12px;font-weight:700;color:var(--muted,#44545f);text-transform:uppercase;letter-spacing:.04em}
.fb-answer{margin-top:4px;color:var(--muted,#44545f)}
