/*
 * MuKaKa - Mobil-Layout
 *
 * Werte 1:1 aus "MuKaKa Prototyp Mobil.dc.html". Der Entwurf zeigt die
 * Bildschirme in einem Telefonrahmen (390x844); hier fuellen sie das Fenster.
 *
 * Zwei durchgaengige Regeln aus dem Entwurf:
 *   - Tippflaechen sind mindestens 42-44 px hoch.
 *   - Eingabefelder haben 16 px Schrift. Alles darunter laesst iOS beim
 *     Antippen hineinzoomen.
 */

.mk-mobile {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: var(--paper);
}

.mk-m-screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  /* Anker fuer die schwebende .mk-loadnote-Pille (position: absolute). */
  position: relative;
}
.mk-m-screen--detail {
  animation: mk-slide-in 0.18s ease-out;
}

.mk-m-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================================
   Katalog
   ============================================================ */

.mk-m-head {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 4px 16px 12px;
  flex-shrink: 0;
}
.mk-m-titlerow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  min-height: 44px;
}
.mk-m-title {
  font-family: 'Instrument Sans', Georgia, serif;
  font-size: 27px;
  line-height: 1.1;
  font-weight: 400;
}
.mk-m-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: var(--accent);
  color: #16181d;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mk-m-searchrow {
  display: flex;
  gap: 8px;
}
.mk-m-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 11px;
  height: 42px;
  min-width: 0;
}
.mk-m-search svg {
  color: var(--muted);
  flex-shrink: 0;
}
.mk-m-search input {
  border: 0;
  background: transparent;
  width: 100%;
  font-size: 16px;
  padding: 0;
  min-width: 0;
}
.mk-m-search-clear {
  color: var(--muted);
  display: flex;
  flex-shrink: 0;
}

.mk-m-filterbtn {
  width: 46px;
  height: 42px;
  border: 1px solid var(--line);
  /* Vorlage: --paper als Hintergrund und --ink als Farbe, nicht --card/--muted */
  background: var(--paper);
  color: var(--ink);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.mk-m-filterbtn--on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.mk-m-filterbadge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mk-m-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 6px;
  flex-shrink: 0;
}
.mk-m-count {
  font-size: 13px;
  color: var(--muted);
}
.mk-m-sortbtn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.mk-m-list {
  padding: 6px 16px 92px;
}
/*
 * Der schwebende "laedt noch"-Hinweis (Grundstil in app.css) muss auf dem
 * Handy hoeher sitzen: unten steht die Tab-Leiste (ca. 78 px hoch), sonst
 * verschwaende der Hinweis dahinter. Nur der Abstand aendert sich.
 */
.mk-mobile .mk-loadnote {
  bottom: 96px;
}
.mk-m-rows {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.mk-m-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px;
  min-height: 84px;
  width: 100%;
  text-align: start;
}
.mk-m-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: var(--tint);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.mk-m-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mk-m-thumb svg {
  color: var(--muted);
  opacity: 0.55;
}
/*
 * Der Zeileninhalt steckt in <span>-Elementen, weil ein <button> laut
 * HTML nur Phrasing-Inhalt aufnehmen darf. Deshalb hier explizit umbrechen.
 */
.mk-m-row > .mk-grow {
  display: block;
  text-align: start;
}
.mk-m-row-vendor,
.mk-m-row-model {
  display: block;
}
.mk-m-row-meta {
  display: flex;
}
.mk-m-thumb {
  display: flex;
}

.mk-m-row-vendor {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.mk-m-row-model {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 5px;
}
.mk-m-row-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
}
.mk-m-row > svg:last-child {
  color: var(--muted);
  flex-shrink: 0;
}

.mk-m-empty {
  text-align: center;
  padding: 60px 20px 0;
}
.mk-m-empty-title {
  font-family: 'Instrument Sans', Georgia, serif;
  font-size: 24px;
  line-height: 1.2;
  margin-bottom: 8px;
}
.mk-m-empty-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 18px;
}
.mk-m-empty-btn {
  display: inline-block;
  padding: 11px 18px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 9px;
  font-size: 15px;
  font-weight: 500;
}

/* ============================================================
   Detail
   ============================================================ */

.mk-m-detailhead {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 6px 8px 8px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.mk-m-back {
  height: 44px;
  padding: 0 10px 0 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}
.mk-m-steps {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}
.mk-m-steps button {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
/* Am ersten bzw. letzten Objekt geht es nicht weiter. */
.mk-m-steps button[disabled] {
  opacity: 0.3;
}
.mk-m-pos {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 52px;
  text-align: center;
}

.mk-m-detailbody {
  padding: 16px 16px 100px;
}
.mk-m-d-vendor {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
.mk-m-d-model {
  font-family: 'Instrument Sans', Georgia, serif;
  font-size: 30px;
  /* Modellname, lange Namen brechen um - siehe Zeilenhoehe in app.css. */
  line-height: 1.2;
  margin-bottom: 8px;
}
.mk-m-d-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.mk-m-d-meta .mk-cond {
  font-size: 13px;
}
.mk-m-d-meta .mk-cond-dot {
  width: 7px;
  height: 7px;
}

.mk-m-hero {
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  margin-bottom: 18px;
  aspect-ratio: 4 / 3;
  background: var(--tint);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mk-m-hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.mk-m-hero-empty {
  color: var(--muted);
  font-size: 14px;
}

.mk-m-seclabel {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px;
}

.mk-m-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  margin-bottom: 20px;
}
.mk-m-field {
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  text-align: start;
}
.mk-m-field-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 3px;
}
.mk-m-field-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 16px;
}
.mk-m-field-value svg {
  color: var(--muted);
  opacity: 0.55;
  flex-shrink: 0;
}
/*
 * Auswahlfelder ohne eigenen Bearbeiten-Zustand - siehe Begruendung in
 * desktop.css. Die Zeile ist immer ein echtes <select>, ein Antippen
 * oeffnet die native Liste direkt.
 */
.mk-m-field-value--select {
  cursor: pointer;
}
.mk-m-select-plain {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.mk-m-select-plain::-ms-expand {
  display: none;
}
.mk-m-select-plain:disabled {
  cursor: default;
  opacity: 1;
  -webkit-text-fill-color: currentColor;
}
.mk-m-field-edit {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mk-m-input,
.mk-m-select {
  flex: 1;
  height: 42px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 16px;
  background: var(--card);
  color: var(--ink);
  min-width: 0;
}
.mk-m-ok {
  height: 42px;
  padding: 0 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.mk-m-invoice {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.mk-m-invoice-chip {
  width: 38px;
  height: 46px;
  border-radius: 5px;
  background: var(--tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}
.mk-m-invoice-name {
  font-size: 14.5px;
  font-weight: 600;
}
.mk-m-invoice-meta {
  font-size: 12.5px;
  color: var(--muted);
}
.mk-m-invoice-open {
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--ink);
}
.mk-m-invoice-empty {
  border: 1px dashed var(--line);
  border-radius: 11px;
  padding: 18px;
  text-align: center;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--muted);
  width: 100%;
}

.mk-m-textblock {
  margin-bottom: 18px;
}
.mk-m-texthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
}
.mk-m-textedit {
  width: 56px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  color: var(--muted);
  opacity: 0.55;
}
.mk-m-textvalue {
  font-size: 15px;
  line-height: 1.6;
  min-height: 44px;
  display: flex;
  align-items: center;
  width: 100%;
  text-align: start;
  white-space: pre-wrap;
}
.mk-m-textarea {
  width: 100%;
  min-height: 108px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 16px;
  line-height: 1.55;
  background: var(--card);
  color: var(--ink);
  resize: none;
}
.mk-m-textactions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.mk-m-textactions .mk-m-commit {
  flex: 1;
  height: 44px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
}
.mk-m-textactions .mk-m-cancel {
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: flex;
  align-items: center;
  font-size: 15px;
  color: var(--muted);
}

/* Fester Balken am unteren Rand (Detail und Erfassen)
 *
 * Frueher lag der Balken "position: absolute" ueber dem Bildschirm. Das
 * nahm ihn aus dem Fluss: der Scroll-Bereich (.mk-m-scroll, flex: 1) fuellte
 * die ganze Hoehe, und das unterste Feld lag hinter dem Balken - man kam
 * beim Erfassen am Handy nicht bis "Funktionskommentar" herunter.
 *
 * Jetzt sitzt der Balken im Fluss: .mk-m-screen ist eine Flex-Spalte, der
 * Balken schrumpft nicht (flex-shrink: 0), also nimmt der Scroll-Bereich
 * genau die Hoehe ueber ihm ein. Der ganze Inhalt ist erreichbar, und der
 * Balken verdeckt nichts mehr - unabhaengig davon, wie hoch er ist.
 */
.mk-m-bottombar {
  flex-shrink: 0;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 10px 16px 26px;
  padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  display: flex;
  gap: 9px;
  z-index: 40;
}
.mk-m-bottombar--stack {
  display: block;
}
.mk-m-bar-main {
  flex: 1;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.mk-m-bar-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex-shrink: 0;
}
.mk-m-bar-icon--danger {
  color: var(--danger);
}

/* ============================================================
   Erfassen
   ============================================================ */

.mk-m-scancard {
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
  width: 100%;
  text-align: start;
}
.mk-m-scancard-title {
  font-size: 15.5px;
  font-weight: 600;
}
.mk-m-scancard-sub {
  font-size: 13px;
  opacity: 0.7;
}

.mk-m-newfield {
  border-top: 1px solid var(--line);
  padding: 11px 12px;
}
.mk-m-newfield-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 5px;
}
.mk-m-newinput,
.mk-m-newselect {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 11px;
  font-size: 16px;
  background: var(--card);
  color: var(--ink);
}
.mk-m-newinput--error,
.mk-m-newselect--error {
  border-color: var(--danger);
}
.mk-m-fielderror {
  font-size: 12.5px;
  color: var(--danger);
  margin-top: 5px;
}
.mk-m-condrow {
  display: flex;
  gap: 6px;
}
.mk-m-condbtn {
  flex: 1;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}
.mk-m-condbtn--on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.mk-m-more {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 500;
  width: 100%;
}
.mk-m-more-state {
  font-size: 13px;
  color: var(--muted);
}
.mk-m-morebody {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  margin-top: -12px;
  padding: 20px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mk-m-save {
  height: 50px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  width: 100%;
}
.mk-m-secondary {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14.5px;
  color: var(--muted);
  width: 100%;
}

/* ============================================================
   Gefuehrtes Erfassen
   ============================================================ */

.mk-m-wizhead {
  background: var(--card);
  padding: 4px 8px 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}
.mk-m-wizhead button,
.mk-m-wizhead .mk-m-spacer {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mk-m-wizstep {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.mk-m-progress {
  height: 3px;
  background: var(--line);
  flex-shrink: 0;
}
.mk-m-progress > div {
  height: 3px;
  background: var(--accent);
  transition: width 0.22s ease;
}
.mk-m-wizbody {
  padding: 24px 20px 120px;
}
.mk-m-wiztitle {
  font-family: 'Instrument Sans', Georgia, serif;
  font-size: 30px;
  /* "Seriennummer erfassen" bricht unter etwa 370px Breite um - siehe app.css. */
  line-height: 1.2;
  margin-bottom: 8px;
}
.mk-m-wizintro-title {
  font-family: 'Instrument Sans', Georgia, serif;
  font-size: 34px;
  /* "Neues Objekt aufnehmen" bricht schon bei 375px um - siehe app.css. */
  line-height: 1.2;
  margin-bottom: 10px;
}
.mk-m-wiztext {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 22px;
  text-wrap: pretty;
}
.mk-m-wizmark {
  width: 66px;
  height: 66px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.mk-m-wizsteps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 26px;
}
.mk-m-wizstep-item {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}
.mk-m-wiznum {
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mk-m-wizstep-title {
  font-size: 15.5px;
  font-weight: 600;
  margin-bottom: 2px;
}
.mk-m-wizstep-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}
.mk-m-wizhint {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
}

.mk-m-scanbig {
  background: var(--ink);
  color: var(--paper);
  border-radius: 14px;
  padding: 22px 18px;
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
  width: 100%;
  text-align: start;
}
.mk-m-scanbig-title {
  font-size: 16.5px;
  font-weight: 600;
}
.mk-m-scanbig-sub {
  font-size: 13.5px;
  opacity: 0.72;
}
.mk-m-fieldnote {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.mk-m-bigfield {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 13px;
  font-size: 17px;
  background: var(--card);
  color: var(--ink);
}
.mk-m-warn {
  margin-top: 10px;
  display: flex;
  gap: 9px;
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--accent);
}
.mk-m-warn svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.mk-m-chiprow {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 22px;
}
.mk-m-chip {
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 9999px;
  font-size: 14.5px;
  font-weight: 500;
  min-height: 42px;
  display: flex;
  align-items: center;
}
.mk-m-chip--on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.mk-m-sublabel {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 9px;
}

.mk-m-radio {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: start;
}
.mk-m-radio--on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.mk-m-radio-dot {
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  border: 2px solid var(--muted);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mk-m-radio--on .mk-m-radio-dot {
  border-color: var(--accent);
  background: var(--accent);
}
.mk-m-radio-dot span {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #ffffff;
}
.mk-m-radio-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}
.mk-m-radio-hint {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}
.mk-m-radios {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 20px;
}

.mk-m-owners {
  display: flex;
  gap: 8px;
}
.mk-m-owner {
  flex: 1;
  height: 50px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15.5px;
  font-weight: 600;
}
.mk-m-owner--on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.mk-m-sumrow {
  border-top: 1px solid var(--line);
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  width: 100%;
  text-align: start;
}
.mk-m-sumlabel {
  font-size: 13px;
  color: var(--muted);
  width: 108px;
  flex-shrink: 0;
}
.mk-m-sumvalue {
  flex: 1;
  font-size: 15.5px;
  min-width: 0;
}
.mk-m-sumvalue--empty {
  color: var(--muted);
}

.mk-m-done {
  padding-top: 46px;
  text-align: center;
}
.mk-m-donemark {
  width: 68px;
  height: 68px;
  border-radius: 9999px;
  background: var(--ok);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
}
.mk-m-donetitle {
  font-family: 'Instrument Sans', Georgia, serif;
  font-size: 32px;
  /* Gleiche Familie wie die uebrigen Assistenten-Titel - siehe app.css. */
  line-height: 1.2;
  margin-bottom: 8px;
}
.mk-m-donetext {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 30px;
}
.mk-m-donebtns {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.mk-m-donebtn {
  height: 52px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.mk-m-donebtn--primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.mk-m-donebtn--quiet {
  height: 48px;
  border: 0;
  background: none;
  font-size: 15.5px;
  font-weight: 400;
  color: var(--muted);
}

.mk-m-wizfoot .mk-m-primary {
  height: 52px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16.5px;
  font-weight: 600;
  width: 100%;
}
.mk-m-wizfoot .mk-m-primary[disabled] {
  background: var(--line);
  color: var(--muted);
}
.mk-m-wizfoot-second {
  height: 42px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mk-m-wizfoot-second button {
  height: 42px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  font-size: 14.5px;
  color: var(--muted);
}

/* ============================================================
   Tab-Leiste
   ============================================================ */

.mk-m-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--card);
  border-top: 1px solid var(--line);
  height: 78px;
  display: flex;
  padding-bottom: 18px;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
}
.mk-m-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  padding-top: 8px;
}
.mk-m-tab--on {
  color: var(--accent);
}
.mk-m-tab-label {
  font-size: 11px;
  font-weight: 500;
}

/* ============================================================
   Bottom-Sheets
   ============================================================ */

.mk-m-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 13, 0.42);
  z-index: 80;
  animation: mk-fade-in 0.15s ease-out;
}
.mk-m-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  z-index: 90;
  animation: mk-sheet-up 0.22s cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.mk-m-sheet--filter {
  max-height: 78%;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}
.mk-m-grabber {
  padding: 10px 0 6px;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}
.mk-m-grabber span {
  width: 38px;
  height: 4px;
  border-radius: 9999px;
  background: var(--line);
}
.mk-m-sheethead {
  padding: 4px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.mk-m-sheettitle {
  font-size: 18px;
  font-weight: 600;
}
.mk-m-sheetreset {
  font-size: 14.5px;
  color: var(--accent);
  padding: 6px;
}
.mk-m-sheetbody {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 12px;
}
.mk-m-facetgroup {
  margin-bottom: 18px;
}
/* Kopf der Kategorie als echter Knopf - klappt die Chips auf/zu.
   Grosszuegige Hoehe, weil hier der Daumen tippt. */
.mk-m-facethead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  background: none;
  border: 0;
  padding: 6px 2px;
  margin: 0 0 9px;
  cursor: pointer;
  color: inherit;
  text-align: start;
  min-height: 40px;
}
.mk-m-facetgroup--collapsed .mk-m-facethead {
  margin-bottom: 0;
}
.mk-m-facetlabel {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
/* Pfeil nach unten (offen), zugeklappt nach rechts gedreht - wie am
   Schreibtisch, weiche Drehung. */
.mk-m-facetcaret {
  display: flex;
  align-items: center;
  color: var(--muted);
  transition: transform 0.18s ease;
}
.mk-m-facetcaret--collapsed {
  transform: rotate(-90deg);
}
.mk-m-facetchips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.mk-m-facetchip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  min-height: 40px;
}
.mk-m-facetchip--on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.mk-m-facetchip-count {
  font-size: 12px;
  opacity: 0.65;
}
/* Die zwei Kalenderfelder unter "Eigener Zeitraum". Die Felder selbst
   sind .mk-m-input - also 42px hoch und mit 16px Schrift, damit iOS beim
   Antippen nicht hineinzoomt. Hier steht nur, wie sie unter den Chips
   stehen. */
.mk-m-facetdates {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 11px;
}
.mk-m-facetdate {
  display: flex;
  align-items: center;
  gap: 9px;
}
.mk-m-facetdate > span {
  font-size: 14px;
  color: var(--muted);
  width: 26px;
  flex-shrink: 0;
}
.mk-m-sheetfoot {
  padding: 12px 16px 28px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.mk-m-sheetfoot .mk-m-apply {
  height: 50px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  width: 100%;
}
.mk-m-sheetrow {
  padding: 15px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  width: 100%;
  text-align: start;
  color: var(--ink);
}
.mk-m-sheetrow--on {
  color: var(--accent);
  font-weight: 600;
}
.mk-m-sheetrow--danger {
  color: var(--danger);
}
.mk-m-accounthead {
  padding: 8px 16px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.mk-m-accountavatar {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: var(--accent);
  color: #16181d;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mk-m-accountname {
  font-size: 16px;
  font-weight: 600;
}
.mk-m-accountrole {
  font-size: 13px;
  color: var(--muted);
}
.mk-m-switch {
  width: 46px;
  height: 27px;
  border-radius: 9999px;
  background: var(--line);
  padding: 3px;
  display: flex;
  justify-content: flex-start;
  flex-shrink: 0;
}
.mk-m-switch--on {
  background: var(--accent);
  justify-content: flex-end;
}
.mk-m-switch span {
  width: 21px;
  height: 21px;
  border-radius: 9999px;
  background: #ffffff;
}

/* ============================================================
   Barcode-Scan
   ============================================================ */

.mk-scan {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mk-scan-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mk-scan-frame {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 38%;
  height: 24%;
  border: 2px solid #ffffff;
  border-radius: 12px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.45);
}
.mk-scan-hint {
  position: absolute;
  left: 0;
  right: 0;
  top: 66%;
  text-align: center;
  color: #ffffff;
  font-size: 15px;
  font-family: 'Instrument Sans', system-ui, sans-serif;
}
.mk-scan-close {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(34px + env(safe-area-inset-bottom, 0px));
  height: 50px;
  padding: 0 26px;
  border: 0;
  border-radius: 11px;
  background: #ffffff;
  color: #16181d;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* ============================================================
   Toast (mobil sitzt er ueber der Tab-Leiste)
   ============================================================ */

.mk-m-toastwrap {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 92px;
  z-index: 120;
}
.mk-m-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 10px 12px 15px;
  border-radius: 11px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  font-size: 14px;
  line-height: 1.35;
}
.mk-m-toast > span {
  flex: 1;
}
.mk-m-toast-undo {
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  font-weight: 600;
  flex-shrink: 0;
  color: inherit;
}
.mk-m-toast-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}
