/* quik Sites: Paketmodell (public/js/module.js): gesperrte Module im Menü, Seite „nicht gebucht“, Wünsche, Pakete, Berichte.
   Regeln: docs/GESTALTUNG.md. Nur Variablen aus public/app.css, keine eigene Signalfarbe, keine Schatten. */

/* ---------- Menü: nicht gebuchtes Modul ---------- */
.sb-link.is-locked { color: var(--ink-faint); }
.sb-link.is-locked > svg:first-child, .sb-link.is-locked > .ic:first-child { opacity: .62; }
.sb-link.is-locked.on, .sb-link.is-locked:hover { color: var(--ink-soft); }
.sb-lock { flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; color: var(--ink-faint); }
.rail-it.is-locked { color: color-mix(in srgb, var(--ink-faint) 62%, transparent); }
.rail-it.is-locked.on { background: var(--surface-3); color: var(--ink-soft); }
.rail-it .rail-lock { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 14px; height: 14px; border-radius: 99px; background: var(--bg-2); color: var(--ink-faint); }

/* ---------- Seite: Abstände ---------- */
.md-page > .card + .card { margin-top: 16px; }
.md-note { margin: -6px 0 10px; max-width: 78ch; }

/* ---------- Kunde: nicht gebuchtes Modul ---------- */
.md-lock { padding: 26px 26px 22px; }
.md-lock-top { display: flex; align-items: center; gap: 16px; }
.md-lock-top h2 { font-size: var(--fs-xl); letter-spacing: -.01em; margin-bottom: 3px; }
.md-lock-ic { position: relative; flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--surface-2); color: var(--ink-soft); }
.md-lock-ic > i { position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft); }
.md-nutzen { list-style: none; margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 12px; }
.md-nutzen li { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 10px; font-size: var(--fs-md); line-height: 1.5; color: var(--ink); }
.md-nutzen li > svg, .md-nutzen li > .ic { margin-top: 3px; color: var(--green-ink); }
.md-lock-act { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-top: 24px; }
.md-asked { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.md-asked-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); font-size: var(--fs-sm); color: var(--ink-soft); }
.md-asked-row > span:not(.bdg) { flex: 1 1 220px; min-width: 0; }
.md-ohne { margin-top: 18px; }
.md-asked + .md-ohne { margin-top: 14px; }

/* ---------- Wünsche ---------- */
.md-w { align-items: flex-start; gap: 12px; padding: 14px 10px; }
.md-w:hover { background: transparent; }
.md-w-t { display: flex; flex-direction: column; gap: 4px; }
.md-w-t > b { font-weight: 560; color: var(--fg); line-height: 1.45; overflow-wrap: anywhere; white-space: pre-line; }
.md-w-x { font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }
.md-w-meta { font-size: var(--fs-xs); color: var(--ink-faint); }
.md-w-a { margin-top: 4px; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); font-size: var(--fs-sm); color: var(--ink); line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }
.md-w-a > span { color: var(--ink-faint); }
.md-w-acts { flex: none; display: flex; align-items: center; gap: 6px; }
/* Zeilen ohne Menü: Platzhalter in der Breite von „⋯“, damit die Status-Marken an einer Kante stehen */
.md-w-sp { flex: none; width: 28px; }
.md-w-q { margin: 0; padding: 10px 14px; border-left: 2px solid var(--line-strong); color: var(--ink-soft); font-size: var(--fs-sm); line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; max-height: 160px; overflow: auto; }
.md-wishes .card-h { flex-wrap: wrap; }

/* ---------- Pakete: Module je Website ---------- */
.md-sites { padding-bottom: 8px; }
.md-tbl-box { margin: 0 -20px; overflow-x: auto; }
.md-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.md-table thead th { padding: 9px 12px; text-align: left; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-faint); border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.md-table td { padding: 11px 12px; vertical-align: middle; border-bottom: 1px solid var(--line-soft); }
.md-table tbody tr:last-child td { border-bottom: 0; }
.md-table th:first-child, .md-table td:first-child { padding-left: 20px; }
.md-table th:last-child, .md-table td:last-child { padding-right: 14px; }
.md-table .md-c-m { width: 1%; padding-right: 22px; }
.md-table .md-c-act { width: 1%; text-align: right; }
.md-c-site { min-width: 200px; }
.md-name { display: block; font-weight: 560; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.md-sub { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.md-hk { color: var(--ink-soft); white-space: nowrap; }
.md-hk-set { font-size: var(--fs-xs); color: var(--ink-faint); }
.md-hk-set:disabled { text-decoration: none; cursor: default; }
.md-sw, .md-ro { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.md-seit { font-size: var(--fs-xs); color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.md-search { min-width: 0; }

/* gebuchte Module als Symbole (Zeilen der Übersicht) */
.md-chips { display: inline-flex; align-items: center; gap: 3px; flex: none; margin-left: 2px; }
.md-chip { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--surface-2); color: var(--ink-soft); }

/* ---------- Dialog: Module einer Website ---------- */
.md-dlg { display: flex; flex-direction: column; }
.md-dlg-sep { height: 1px; margin: 6px 0; background: var(--line-soft); }
.md-dlg-sep + .srow { border-top: 0; }
.md-dlg .srow-c .seg { flex-wrap: nowrap; }
.md-log { margin-bottom: 0; }
.md-log-l { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); color: var(--ink-soft); }
.md-log-l li { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; }
.md-log-l time { color: var(--ink-faint); font-variant-numeric: tabular-nums; }

/* ---------- Sichtbarkeit: Monatsberichte ---------- */
.md-rep .card-h h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.md-zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 28px; margin: 2px 0 18px; padding: 14px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.md-zahlen > div { padding: 6px 0; min-width: 0; }
.md-zahlen dt { font-size: var(--fs-xs); color: var(--ink-faint); }
.md-zahlen dd { margin: 3px 0 0; display: flex; flex-direction: column; gap: 2px; }
.md-bar { display: flex; margin: -12px 0 16px; }
.md-zahlen dd b { font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -.02em; color: var(--fg); font-variant-numeric: tabular-nums; }
.md-zahlen dd span { font-size: var(--fs-xs); color: var(--ink-faint); white-space: nowrap; }
.md-zahlen dd span.is-gut { color: var(--green-ink); }
.md-rep-text { display: flex; flex-direction: column; gap: 10px; max-width: 72ch; font-size: var(--fs-md); line-height: 1.6; color: var(--ink); }
.md-rep-text p { white-space: pre-line; overflow-wrap: anywhere; }
.md-rep-von { margin-top: 14px; }
.md-zahlen-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.md-zahlen-in .fld { margin-bottom: 6px; }
.md-zahlen-in label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.md-aus { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.md-aus .grow { display: flex; flex-direction: column; gap: 2px; }
.md-aus b { font-weight: 560; }

@media (max-width: 640px) {
  .md-lock { padding: 20px 18px; }
  .md-lock-top { align-items: flex-start; }
  .md-lock-act .btn { width: 100%; justify-content: center; }
  /* Wunsch am Handy: Menü oben rechts, Status darunter bündig mit dem Text */
  .md-w { flex-wrap: wrap; row-gap: 8px; }
  .md-w > .md-w-t { flex: 1 1 calc(100% - 110px); }
  .md-w-acts { display: contents; }
  .md-w-acts > .row-more { order: 2; flex: none; margin-left: auto; }
  .md-w-acts > :not(.row-more) { order: 3; flex: none; }
  .md-w-acts > :first-child:not(.row-more) { margin-left: 46px; }
  .md-w-acts > .md-w-sp { display: none; }
  .md-tbl-box { margin: 0 -16px; }
  .md-table .md-c-m { width: auto; }
  .md-sw, .md-ro { flex-direction: column; align-items: flex-start; gap: 4px; }
  .md-zahlen-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md-dlg .srow { flex-wrap: wrap; }
  .md-dlg .srow-c .seg { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .md-lock *, .md-table * { transition: none !important; } }

/* Verweis auf offene Wünsche (Liste liegt unter Zusammenarbeit) */
.md-wlink { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface); color: var(--fg); text-decoration: none; }
.md-wlink:hover { background: var(--hover); }
.md-wishes + .md-wlink { margin-top: 16px; }
.md-wishes .card-h h2 { display: flex; align-items: center; gap: 8px; }
.md-wlink > span { margin-left: auto; font-size: var(--fs-sm); color: var(--ink-soft); }
.md-wlink > svg { flex: none; color: var(--ink-soft); }

/* >>> Runde 4, Feinschliff Pakete (Agent r4c) */
/* Module je Website: Spalten bleiben gleich breit („seit“ steht im Tooltip und im Dialog der Website), Schalter mittig zur Zeile */
.md-table .md-seit { display: none; }
.md-table .md-sw, .md-table .md-ro { display: flex; }
.md-table .md-c-m { padding-right: 22px; }
@media (max-width: 640px) {
  /* Handy: der Name der Website bleibt beim Wischen stehen, Suche unter dem Titel (Herkunft hat seit dem Audit vom
     25.11.2026 keine eigene Spalte mehr, sie steht in der Unterzeile und im „⋯“) */
  .md-table thead th:first-child, .md-table td.md-c-site { position: sticky; left: 0; z-index: 1; background: var(--surface); }
  .md-table td.md-c-site { min-width: 0; max-width: 168px; }
  .md-table .md-name, .md-table .md-sub { max-width: 136px; }
  .md-sites .card-h { flex-wrap: wrap; }
  .md-sites .card-h .ct-search { width: 100%; }
  /* Gesperrtes Modul: Stand, Datum und „Zurückziehen“ in einer Zeile */
  .md-asked-row > span:not(.bdg) { flex: 1 1 auto; }
  /* Neue Websites: Schalter rechts neben dem Text wie in allen Einstellungszeilen */
  .md-std .srow { flex-wrap: nowrap; }
  .card.md-std .srow.has-ic > .srow-t { flex: 1 1 0; min-width: 0; }
  .card.md-std .srow.has-ic > .srow-c { width: auto; flex: none; margin-left: 0; }
}
/* <<< Runde 4 */

/* ---------- Preise & Pakete (#/pakete, public/js/module.js paketePage, public/js/tarife.js paketeTarifCard) ----------
   Drei Blöcke: oben nebeneinander „Das zahlen Sie“ und „Das bieten Sie Ihren Kunden an“, darunter „Je Website“.
   Zahlen groß, Erklärungen im Info-Symbol (docs/GESTALTUNG.md 14 und 17). Nur Variablen, hell und dunkel von selbst. */
.pp-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; margin-bottom: 16px; align-items: stretch; }
.pp-top > :only-child { grid-column: 1 / -1; }
.pp-page > .md-wishes { margin-bottom: 16px; }
.pp-card { display: flex; flex-direction: column; min-width: 0; }
.pp-card .card-h h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.pp-card .card-h h2 > .bdg { margin-left: 2px; }
/* Das zahlen Sie: Rechnung mit großer Zahl */
.pp-rech { display: flex; flex-direction: column; gap: 2px; }
.pp-formel { font-size: var(--fs-md); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.pp-gross { font-size: clamp(30px, 3vw, 40px); font-weight: 650; letter-spacing: -.03em; line-height: 1.1; color: var(--fg); font-variant-numeric: tabular-nums; }
.pp-unter { font-size: var(--fs-sm); color: var(--ink-soft); }
.pp-inkl { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pp-inkl li { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--surface-2); font-size: var(--fs-xs); color: var(--ink-soft); cursor: default; }
.pp-inkl li > svg, .pp-inkl li > .ic { color: var(--green-ink); }
.pp-zeilen { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; }
.pp-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: var(--fs-sm); color: var(--ink-soft); }
.pp-zeile b { font-size: var(--fs-base); font-weight: 650; color: var(--fg); font-variant-numeric: tabular-nums; white-space: nowrap; }
button.pp-zeile { width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; font: inherit; font-size: var(--fs-sm); color: var(--ink); text-align: left; cursor: pointer; padding-bottom: 0; }
button.pp-zeile:hover { color: var(--fg); }
button.pp-zeile > svg, button.pp-zeile > .ic { color: var(--ink-faint); }
.pp-zahlen > .note { margin-top: 12px; align-items: center; }
.pp-zahlen > .note > .ic { margin-top: 0; }
.pp-verlauf { margin: 0 -10px; }
/* Das bieten Sie Ihren Kunden an: Basis und Module mit Preis rechts */
.pp-mods { display: flex; flex-direction: column; }
.pp-mod { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line-soft); min-width: 0; }
.pp-mod:first-child { border-top: 0; padding-top: 0; }
.pp-mod-t { flex: 1 1 auto; display: grid; min-width: 0; line-height: 1.3; }
.pp-mod-t b { font-weight: 560; color: var(--fg); }
.pp-mod-t small { font-size: var(--fs-xs); color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-preis { flex: none; display: grid; justify-items: end; line-height: 1.2; text-align: right; min-width: 84px; }
.pp-preis b { font-size: var(--fs-lg); font-weight: 650; color: var(--fg); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pp-preis small { font-size: var(--fs-2xs); color: var(--ink-faint); }
.pp-preis.is-leer { font-size: var(--fs-xs); color: var(--ink-faint); }
.pp-fuss { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: var(--fs-xs); color: var(--ink-faint); }
/* Dialog „Ihre Preise für Kunden“ */
.pp-preise { gap: 0; }
.pp-p-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.pp-p-row:first-child { border-top: 0; }
.pp-p-row > label { display: flex; align-items: center; gap: 10px; min-width: 0; margin: 0; }
.pp-p-row .srow-ic { width: 30px; height: 30px; }
.pp-p-t { display: grid; min-width: 0; line-height: 1.3; }
.pp-p-t b { font-weight: 560; color: var(--fg); }
.pp-p-t small { font-size: var(--fs-xs); color: var(--ink-faint); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-in-w { flex: none; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); }
.pp-in { width: 96px; text-align: right; font-variant-numeric: tabular-nums; }
.pp-p-row > .fld-err { flex-basis: 100%; }
.pp-p-row:has(.fld-err) { flex-wrap: wrap; }
.pp-preise > .srow { border-top: 1px solid var(--line-soft); margin-top: 4px; }
/* Je Website: Abrechnung, Umsatz, Spanne; Summe oben rechts */
.pp-sites .card-h { align-items: center; }
.pp-sites-r { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pp-summe { display: grid; justify-items: end; line-height: 1.15; text-align: right; cursor: default; }
.pp-summe small { font-size: var(--fs-xs); color: var(--ink-soft); white-space: nowrap; }
.pp-summe b { font-size: var(--fs-2xl); font-weight: 650; letter-spacing: -.02em; color: var(--fg); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pp-table .pp-c-ab { width: 1%; white-space: nowrap; padding-right: 12px; }
.pp-table .pp-c-eur { width: 1%; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 8px; padding-right: 12px; }
/* Mit Abrechnung, Umsatz und Spanne wird die Tabelle breiter: Modulspalten enger, damit bei 1440 px alles sichtbar bleibt */
.pp-table .md-c-m { padding-left: 8px; padding-right: 10px; }
.pp-table .md-c-site { min-width: 150px; }
.pp-table .md-name { max-width: 240px; }
.pp-table td.pp-c-eur { font-weight: 560; color: var(--fg); }
.pp-table td.pp-c-eur.is-blass { font-weight: 400; color: var(--ink-faint); }
/* Reiter „Tarif & Verlauf“ der Marke: Verweis auf „Preise & Pakete“ */
.pp-hin { display: flex; align-items: center; gap: 12px; color: var(--fg); text-decoration: none; }
.pp-hin:hover { background: var(--hover); }
.pp-hin > .grow { display: grid; min-width: 0; line-height: 1.35; }
.pp-hin > .grow b { font-weight: 600; }
.pp-hin > .grow small { font-size: var(--fs-sm); color: var(--ink-soft); }
.pp-hin-go { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
/* Kunde: Preis der Marke auf der Seite eines nicht gebuchten Moduls */
.md-preis { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 0; }
.md-preis b { font-size: var(--fs-2xl); font-weight: 650; letter-spacing: -.02em; color: var(--fg); font-variant-numeric: tabular-nums; }
.md-preis span { font-size: var(--fs-sm); color: var(--ink-soft); }
@media (max-width: 960px) {
  .pp-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .pp-sites .card-h { flex-wrap: wrap; }
  .pp-sites-r { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .pp-sites-r > .pp-summe { justify-items: start; text-align: left; }
  .pp-hin-go { display: none; }
  .pp-in { width: 84px; }
  .pp-p-t small { white-space: normal; }
  /* Tabelle „Je Website“: eigener waagrechter Scrollbereich statt Überlauf der Seite (Website-Spalte bleibt stehen, s. o.) */
  .pp-sites .md-tbl-box { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .pp-table { min-width: 640px; }
}
