/*
 * ProDigital-App-Design · Komponenten (zu Tokens v0.3)
 *
 * Allgemeine Bausteine: Seite, Kopf mit Drei-Streifen-Block, Karte (die EINZIGE Kastenform),
 * Abschnitte mit Nummernkreis, Dropzone, Felder, Chips, Balken, Buttons, Listen, Kennzahl,
 * Meldungen ohne Kasten, Markierung. Werte nur über Variablen aus tokens.css.
 * App-eigene Bausteine gehören ins Stylesheet der App, nicht hierher.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 24px 56px;
}

p {
  margin: 0;
}

.muted {
  color: var(--text-2);
  font-size: 14px;
}

.hint {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
}

code {
  font-family: "Consolas", "Cascadia Mono", monospace;
  font-size: 0.92em;
  color: var(--head);
}

/* Hervorhebungen in Zähler und Meldungen (vor `.drop b`, sonst sinkt die Spezifität) */
.zaehler b {
  color: var(--head);
  font-weight: 700;
}

.meldung b {
  color: var(--head);
}

/* ─── Header: Drei-Streifen-Block, Titel, Logo, Trennlinie ─────────────────────── */

.hd {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.stripes {
  display: flex;
  gap: 6px;
  flex: none;
}

.stripes i {
  display: block;
  width: 9px;
  height: 44px;
  border-radius: 2px;
}

.stripes i:nth-child(1) {
  background: var(--streifen-1);
}

.stripes i:nth-child(2) {
  background: var(--pd-cyan);
}

.stripes i:nth-child(3) {
  background: var(--pd-border);
}

.hd-t {
  flex: 1;
  min-width: 0;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--title);
  letter-spacing: -0.01em;
}

.lead {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--text-2);
}

.logo {
  height: 46px;
  width: auto;
  flex: none;
}

.logo.l {
  display: var(--logo-light);
}

.logo.d {
  display: var(--logo-dark);
}

.theme {
  margin-left: 4px;
  flex: none;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--text-2);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}

.theme:hover {
  border-color: var(--pd-cyan);
  color: var(--pd-cyan);
}

/* ─── Karte: einzige Kastenform, Türkiskante folgt der Rundung ─────────────────── */

.card {
  position: relative;
  margin-top: 24px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--pd-cyan);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 8px 32px 32px;
}

.card.slim {
  padding-bottom: 14px;
}

.sec {
  padding: 24px 0 4px;
}

.sec + .sec {
  border-top: 1px solid var(--line);
  margin-top: 24px;
}

.sh {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
}

.sh.knapp {
  margin-bottom: 6px;
}

.nr {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--pd-cyan);
  color: var(--pd-white);
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
}

h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--head);
  overflow-wrap: anywhere;
}

.eyebrow,
.eyebrow-s {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--pd-cyan);
}

h3.eyebrow {
  margin: 18px 0 8px;
}

.eyebrow-s {
  margin: 0 0 4px;
}

/* ─── Dropzone ─────────────────────────────────────────────────────────────────── */

.drop {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 112px;
  padding: 20px 24px;
  border: 1.5px dashed var(--field-border);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
  width: 100%;
  font: inherit;
  color: var(--text);
  text-align: left;
}

.drop:hover,
.drop.over {
  border-color: var(--pd-cyan);
  border-style: solid;
}

.drop:focus-visible,
.btn:focus-visible,
.fld:focus-visible,
.chip:focus-visible,
.theme:focus-visible {
  outline: 2px solid var(--pd-cyan);
  outline-offset: 2px;
}

.tile {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--tile);
  display: grid;
  place-items: center;
}

.drop b {
  display: block;
  font-weight: 600;
  font-size: 15px;
}

.drop span.unter {
  font-size: 13px;
  color: var(--text-2);
}

.drop.has b {
  color: var(--head);
}

/* ─── Felder ───────────────────────────────────────────────────────────────────── */

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

label.feld {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.fld {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-s);
}

select.fld {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%2302B0EF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

select.fld option {
  color: var(--pd-text);
  background: var(--pd-white);
}

.fld::placeholder {
  color: var(--text-2);
  opacity: 0.75;
}

.fld.geaendert {
  border-color: var(--pd-cyan);
}

/* ─── Namen-Chips ──────────────────────────────────────────────────────────────── */

.zaehler {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 4px;
  font-size: 13px;
  color: var(--text-2);
}

.bar {
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
  margin: 6px 0 4px;
}

.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--pd-cyan);
  transition: width 0.2s;
}

.bar.lg {
  height: 8px;
  border-radius: 4px;
  margin: 18px 0 22px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 999px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.chip:hover:not(:disabled) {
  border-color: var(--pd-cyan);
}

.chip.on {
  border-color: var(--pd-cyan);
  background: var(--chip-on-bg);
  color: var(--chip-on-text);
  font-weight: 600;
}

.chip.on::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--pd-cyan);
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px var(--chip-on-bg);
}

.chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chip .weg {
  font-weight: 700;
  color: var(--text-2);
}

.empty {
  font-size: 14px;
  color: var(--text-2);
  padding: 8px 0;
}

.linkknopf {
  font: inherit;
  font-size: 12.5px;
  background: none;
  border: 0;
  color: var(--pd-cyan);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* ─── Buttons: primär gefüllt, sekundär Kontur ─────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 22px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-s);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.btn.p {
  background: var(--btn-bg);
  color: var(--btn-text);
}

.btn.p:hover:not(:disabled) {
  background: var(--btn-bg-hover);
}

.btn.s {
  background: transparent;
  color: var(--head);
  border-color: var(--field-border);
}

.btn.s:hover:not(:disabled) {
  border-color: var(--pd-cyan);
  color: var(--pd-cyan);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn.sm {
  height: 32px;
  padding: 0 14px;
  font-size: 12.5px;
}

.go {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.go .btn {
  height: 46px;
  padding: 0 28px;
  font-size: 15px;
}

.aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* ─── Listen: gespeicherte Transkripte, ähnliche Stellen ───────────────────────── */

.list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.row:first-child {
  border-top: 0;
}

.row .t {
  flex: 1;
  min-width: 0;
}

.row .t b {
  display: block;
  font-weight: 600;
  color: var(--head);
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row .t span {
  font-size: 12.5px;
  color: var(--text-2);
}

.row .a {
  display: flex;
  gap: 8px;
  flex: none;
  align-items: center;
}

.wahl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

.wahl input {
  width: 18px;
  height: 18px;
  accent-color: var(--pd-cyan);
}

/* ─── Kennzahl und Status (Ansicht „Läuft“) ────────────────────────────────────── */

.prozent {
  font-size: 44px;
  line-height: 1;
  font-weight: 800;
  color: var(--head);
  font-variant-numeric: tabular-nums;
}

.prozent small {
  font-size: 22px;
  color: var(--pd-cyan);
  font-weight: 700;
  margin-left: 2px;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text);
}

.puls {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pd-cyan);
  animation: puls 1.4s ease-in-out infinite;
}

@keyframes puls {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .puls {
    animation: none;
  }
}

/* ─── Meldungen ohne Kasten: Markierungskreis + Zeile ──────────────────────────── */

.meldungen {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

.meldung {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.meldung .m {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  margin-top: 1px;
}

.meldung.warn .m {
  background: var(--pd-gelb);
  color: var(--pd-navy);
}

.meldung.info .m {
  border: 1.5px solid var(--pd-cyan);
  color: var(--pd-cyan);
}

.meldung.ok .m {
  background: var(--pd-cyan);
  color: var(--pd-white);
}

/* ─── Markierung im Text ───────────────────────────────────────────────────────── */

mark {
  background: var(--pd-markierung);
  color: inherit;
  border-radius: 4px;
  padding: 0 3px;
}

@media (max-width: 720px) {
  .grid2 {
    grid-template-columns: 1fr;
  }

  .logo {
    height: 34px;
  }

  .card {
    padding: 4px 20px 24px;
  }

  .row {
    flex-wrap: wrap;
  }
}
