/* MitaBase Pro — a product of ETMITA · https://etmita.com
   Copyright © ETMITA. All rights reserved. */
/* public/kunden.css — the Kunden page (M8b, 2026-09-26).

   Deliberately thin: the patients table and the add/edit dialog moved
   VERBATIM out of Stammdaten and keep their db3-* classes, so
   database.css keeps dressing them — one look, no copy. This file owns
   only what is new here: the header's action, the tab counters, the
   institutional rows, the GO-partner badge and the wizard. Tokens
   only; logical properties; no coloured status stripe. */

.kd3 .db3-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.kd3-tab-n {
  min-width: 18px;
  padding-inline: 5px;
  border-radius: 999px;
  background: var(--surface-inset);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.db3-tab.is-on .kd3-tab-n {
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* the institutional rows */
.kd3-ty {
  color: var(--text-muted);
  font-size: 11px;
}
.kd3-gobadge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.kd3-go td {
  opacity: 0.92;
}

/* ── the wizard ──────────────────────────────────────────────────── */
.kd3-wiz {
  inline-size: min(680px, 96vw);
}
.kd3-wiz-step {
  margin-inline-start: 8px;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
}
.kd3-wiz-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kd3-wiz-q {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.kd3-wiz-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 12.5px;
}
.kd3-wiz-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.kd3-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 44px;
  padding: 14px;
  text-align: start;
}
.kd3-opt b {
  font-size: 13.5px;
}
.kd3-opt span {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}
.kd3-wiz-ty {
  display: flex;
  gap: 14px;
}
.kd3-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
}
.kd3-radio input {
  accent-color: var(--accent-text);
  inline-size: 16px;
  block-size: 16px;
}
.kd3-wiz-read {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  margin: 0;
}
.kd3-wiz-read dt {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}
.kd3-wiz-read dd {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.kd3-opt:focus-visible,
.kd3-radio input:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .kd3-wiz-cards {
    grid-template-columns: 1fr;
  }
  .kd3 .db3-header .dsp3-act {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kd3 * {
    transition: none !important;
    animation: none !important;
  }
}

/* the passenger app's invitation, shown once (2026-11-03) */
.kd3-pax { width: min(520px, calc(100vw - 32px)); }
.kd3-pax-for { margin: -4px 0 0; color: var(--text-secondary); font-weight: 600; }
.kd3-pax-body { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.kd3-pax-qr { flex: 0 0 auto; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-subtle); line-height: 0; } /* the svg carries its own white quiet zone: a QR reads dark on light in every theme */
.kd3-pax-qr svg { display: block; width: 188px; height: 188px; }
.kd3-pax-codes { flex: 1 1 180px; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; align-items: baseline; }
.kd3-pax-codes dt { color: var(--text-muted); font-size: 12px; }
.kd3-pax-codes dd { margin: 0; font-family: var(--font-mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; }
.kd3-pax-code { font-size: 22px; font-weight: 700; letter-spacing: .08em; color: var(--text-primary); }
.kd3-pax-how { margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }

/* the passenger app's complaints (V2, 2026-11-04): the office's inbox in Kunden.
   A safety complaint still open wears a tinted ground and its word — never a stripe. */
.kd3-pc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.kd3-pc { padding: 14px 16px; display: grid; gap: 8px; }
.kd3-pc.is-urgent { background: var(--status-expired-soft); }
/* a Betreuer waiting for the office's confirmation: a tinted ground, never a stripe (V2, 2026-11-04) */
.kd3-pc.is-waiting { background: var(--status-info-soft); }
.kd3-pc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.kd3-pc-meta { color: var(--text-secondary); font-size: 13px; }
.kd3-pc-st { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-inset); color: var(--text-secondary); }
.kd3-pc-st.is-in_bearbeitung { background: var(--status-info-soft); color: var(--status-info-text); }
.kd3-pc-st.is-erledigt { background: var(--status-valid-soft); color: var(--status-valid-text); }
.kd3-pc-text, .kd3-pc-answer { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.kd3-pc-answer { color: var(--text-secondary); }
.kd3-pc-acts { display: flex; flex-wrap: wrap; gap: 8px; }
