/* SMAP-Seite: Ergänzungen zum Mieterservice-Stil (tenant.css) */
[hidden] { display: none !important; }
.sm-loading { display: flex; align-items: center; gap: .625rem; color: var(--muted-foreground); font-size: .9375rem; }
.sm-loading svg { width: 1.125rem; height: 1.125rem; }
.sm-lock { width: 1.1rem; height: 1.1rem; color: var(--brand-olive); }

/* Einfachauswahl als Liste (wie die bisherige App) */
.sm-choices { border-radius: .75rem; border: 1px solid var(--input); overflow: hidden; }
.sm-choice { position: relative; display: flex; align-items: center; gap: .875rem; min-height: 3.25rem; padding: .625rem 1rem; cursor: pointer;
  font-size: 1rem; line-height: 1.4; transition: background-color .15s; -webkit-tap-highlight-color: transparent; }
.sm-choice + .sm-choice { border-top: 1px solid var(--border); }
.sm-choice input { position: absolute; left: 1rem; top: 50%; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.sm-choice .dot { flex-shrink: 0; width: 1.375rem; height: 1.375rem; border-radius: 9999px; border: 2px solid var(--input); background: var(--card);
  display: grid; place-items: center; transition: border-color .15s; }
.sm-choice .dot::after { content: ""; width: .625rem; height: .625rem; border-radius: 9999px; background: var(--primary); transform: scale(0); transition: transform .15s; }
.sm-choice input:checked + .dot { border-color: var(--primary); }
.sm-choice input:checked + .dot::after { transform: scale(1); }
.sm-choice input:focus-visible + .dot { box-shadow: 0 0 0 3px oklch(42% .085 150 / .2); }
.sm-choice:has(input:checked) { background: oklch(94% .04 118 / .45); font-weight: 500; }
.sm-choices[aria-invalid="true"] { border-color: var(--destructive); }

/* Mehrfachauswahl (Tätigkeiten) */
.sm-multi { position: relative; }
.sm-multi-btn { display: flex; align-items: center; justify-content: space-between; gap: .75rem; text-align: left; cursor: pointer; }
.sm-multi-btn svg { width: 1rem; height: 1rem; flex-shrink: 0; color: var(--muted-foreground); transition: transform .15s; }
.sm-multi-btn[aria-expanded="true"] { border-color: var(--ring); box-shadow: 0 0 0 3px oklch(42% .085 150 / .15); }
.sm-multi-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.sm-multi-btn .placeholder { color: oklch(50% .012 150 / .7); }
.sm-multi-panel { margin-top: .5rem; border-radius: .75rem; border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow-card); padding: .375rem; }
#act-list { max-height: min(55vh, 26rem); overflow-y: auto; overscroll-behavior: contain; }
.sm-check { position: relative; display: flex; align-items: flex-start; gap: .75rem; padding: .625rem .625rem; border-radius: .5rem; cursor: pointer; font-size: .9375rem; line-height: 1.45;
  -webkit-tap-highlight-color: transparent; }
.sm-check input { position: absolute; left: .75rem; top: .75rem; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.sm-check .box { flex-shrink: 0; margin-top: .0625rem; width: 1.25rem; height: 1.25rem; border-radius: .3125rem; border: 2px solid var(--input); background: var(--card);
  display: grid; place-items: center; color: var(--primary-foreground); transition: background-color .15s, border-color .15s; }
.sm-check .box svg { width: .8rem; height: .8rem; stroke-width: 3; opacity: 0; }
.sm-check input:checked + .box { background: var(--primary); border-color: var(--primary); }
.sm-check input:checked + .box svg { opacity: 1; }
.sm-check input:focus-visible + .box { box-shadow: 0 0 0 3px oklch(42% .085 150 / .2); }
.sm-check-all { font-weight: 500; border-bottom: 1px solid var(--border); border-radius: .5rem .5rem 0 0; margin-bottom: .25rem; }
.sm-check-plain { padding: .25rem 0; font-size: 1rem; }
.sm-multi-done { width: 100%; margin-top: .375rem; min-height: 2.75rem; }
.sm-chips { margin-top: .625rem; display: flex; flex-direction: column; gap: .375rem; }
.sm-chips li { display: flex; gap: .5rem; align-items: flex-start; font-size: .875rem; line-height: 1.4; padding: .5rem .75rem; border-radius: .625rem; background: var(--secondary); }
.sm-chips li svg { width: .875rem; height: .875rem; flex-shrink: 0; margin-top: .1875rem; color: var(--primary); }

/* Abschnitte innerhalb einer Karte */
.sm-sub { padding-top: 1rem; border-top: 1px solid var(--border); }
.sm-subhead { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.sm-textarea-s { min-height: 5rem !important; }

/* Ja/Nein */
.sm-seg { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.sm-seg label { position: relative; }
.sm-seg input { position: absolute; left: 50%; top: 50%; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.sm-seg span { display: flex; min-height: 3rem; align-items: center; justify-content: center; border-radius: .75rem; border: 1px solid var(--input);
  background: var(--card); font-weight: 500; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.sm-seg input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.sm-seg input:focus-visible + span { box-shadow: 0 0 0 3px oklch(42% .085 150 / .2); }

/* Gestrichelte Aktionsfelder (wie die bisherige App) */
.sm-dashed { display: flex; width: 100%; min-height: 4rem; align-items: center; justify-content: center; gap: .625rem; border-radius: .875rem;
  border: 1.5px dashed oklch(70% .01 150); background: transparent; color: var(--primary); font-size: 1rem; font-weight: 500;
  transition: background-color .15s, border-color .15s; }
.sm-dashed svg { width: 1.25rem; height: 1.25rem; }
.sm-dashed[aria-invalid="true"] { border-color: var(--destructive); color: var(--destructive); }
#passes:not(:empty) { margin-bottom: 1rem; }

/* Durchgänge */
.sm-pass { border-radius: .875rem; border: 1px solid var(--border); padding: 1rem; background: var(--card); }
.sm-pass-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.sm-pass-title { font-size: 1rem; font-weight: 600; }
.sm-icon-btn { display: grid; width: 2.5rem; height: 2.5rem; place-items: center; border-radius: 9999px; color: var(--muted-foreground); }
.sm-icon-btn svg { width: 1.125rem; height: 1.125rem; }
.ts-thumbs li .progress { position: absolute; left: .375rem; right: .375rem; bottom: .375rem; height: .25rem; border-radius: 9999px; background: oklch(100% 0 0 / .6); overflow: hidden; }
.ts-thumbs li .progress i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.ts-thumbs li.busy img { opacity: .55; }

/* Unterschrift / Zeitpunkt */
.sm-sig-show { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-radius: .875rem; border: 1px solid var(--input); padding: .5rem .75rem; background: #fff; }
.sm-sig-show img { max-height: 5.5rem; max-width: 70%; object-fit: contain; }
.sm-btn-s { min-height: 2.5rem; padding: 0 1rem; font-size: .875rem; }
.sm-time { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3rem; border-radius: .75rem; background: var(--secondary); padding: .5rem 1rem; font-weight: 500; }
.sm-link { color: var(--primary); font-size: .875rem; font-weight: 500; }
.ts-input:disabled { -webkit-text-fill-color: var(--muted-foreground); opacity: 1; }

/* Unterschriftsfeld als Overlay */
.sm-sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: oklch(22% .012 150 / .45);
  padding: max(1rem, env(safe-area-inset-top)) 0 0; }
.sm-sheet[hidden] { display: none; }
.sm-sheet-panel { width: 100%; max-width: 42rem; border-radius: 1.25rem 1.25rem 0 0; background: var(--card); padding: 1.25rem 1.25rem max(1.25rem, env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px -12px oklch(20% .02 150 / .35); }
.sm-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .25rem; }
.sm-sheet-head h2 { font-size: 1.125rem; font-weight: 600; }
.sm-sig-pad { display: block; margin-top: .875rem; width: 100%; height: min(42vh, 15rem); border-radius: .875rem; border: 1.5px dashed oklch(70% .01 150);
  background: #fff; touch-action: none; cursor: crosshair; }
.sm-sheet-btns { margin-top: 1rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem; }
.sm-sheet-btns .ts-btn-primary { width: auto; }
body.sheet-open { overflow: hidden; }
@media (min-width: 640px) {
  .sm-sheet { align-items: center; padding: 1.5rem; }
  .sm-sheet-panel { border-radius: 1.25rem; }
  .sm-sig-pad { height: 16rem; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .sm-sig-pad { height: 52vh; }
}

/* Fußzeile */
.sm-link-plain { padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 2px; }

@media (hover: hover) {
  .sm-choice:hover { background: var(--muted); }
  .sm-check:hover { background: var(--muted); }
  .sm-check-plain:hover { background: none; }
  .sm-dashed:hover { background: oklch(94% .04 118 / .35); border-color: var(--primary); }
  .sm-icon-btn:hover { background: var(--muted); color: var(--foreground); }
  .sm-link:hover { text-decoration: underline; }
  .sm-link-plain:hover { color: var(--foreground); }
}

/* „Alle auswählen“ teilweise gewählt */
.sm-check input:indeterminate + .box { background: var(--primary); border-color: var(--primary); }
.sm-check input:indeterminate + .box::after { content: ""; width: .625rem; height: 2px; border-radius: 1px; background: var(--primary-foreground); }
.sm-check input:indeterminate + .box svg { display: none; }
.ts-btn-outline svg { flex-shrink: 0; }
.sm-pass .ts-photos { padding: .875rem; }

/* Zähler: Zählernummer und Zählerstand nebeneinander (ab Tablet), auf dem Handy untereinander */
.sm-meter { border: 0; margin: 0; padding: 0; min-width: 0; }
.sm-meter > legend { padding: 0; margin-bottom: 0.35rem; }
.sm-meter-row { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .sm-meter-row { grid-template-columns: 1fr 1fr; } }
.sm-meter-sub { font-weight: 400; font-size: .8125rem; color: var(--muted-foreground); }
.ts-hint { font-size: .8125rem; line-height: 1.35; color: var(--muted-foreground); margin: .25rem 0 .5rem; }
