/* Desktop-Ansicht (365leads-plattform #97).
   base.html bindet diese Datei mit media="(min-width: 900px) and (pointer: fine)" ein. Die
   Regeln gelten also nur in einem breiten Fenster mit Maus oder Trackpad. Am Handy und am
   Tablet mit Finger bleibt alles, wie es ist. Keine User-Agent-Weiche: Breite und Zeigegerät
   entscheiden. Dieselbe Abfrage steht in desktop.js für die Tastaturbedienung. */

header { padding: 20px 32px 8px; }
main { max-width: 760px; padding: 16px 32px 40px; }
body.breit main { max-width: 1280px; }
h1 { font-size: 28px; }
.nur-desktop { display: block; }

/* Knöpfe nehmen am Desktop nur so viel Platz wie nötig. */
.btn { display: inline-block; width: auto; min-width: 220px; padding: 12px 22px; font-size: 19px; }
.btn.zweit { font-size: 15px; }

/* Start: Knöpfe in zwei Spalten, der Hauptknopf über die volle Breite. */
body.start .knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 14px; }
body.start .knoepfe .btn { width: 100%; margin: 0 !important; }
body.start .knoepfe .btn:not(.zweit) { grid-column: 1 / -1; }

/* ---- Meine Leads: Tabelle links, Detail rechts ------------------------------------- */

body.leads .leads-werkzeuge { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 0 0 14px; }
body.leads .leads-werkzeuge form.suche { flex: 1 1 360px; display: flex; gap: 8px; margin: 0; padding: 0; border: 0; background: none; }
body.leads .leads-werkzeuge form.suche label.feld { flex: 1; margin: 0; }
body.leads .leads-werkzeuge form.suche label.feld > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
body.leads .leads-werkzeuge form.suche input { padding: 10px 12px; font-size: 15px; }
body.leads .leads-werkzeuge form.suche .btn { min-width: 0; margin: 0 !important; padding: 10px 16px !important; font-size: 15px !important; }
body.leads .leads-werkzeuge .filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 !important; }
body.leads .leads-zahlen { max-width: 460px; }
body.leads .leads-aktionen { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: flex-start; }
body.leads .leads-aktionen form { margin: 0 0 14px !important; }
body.leads .leads-aktionen .klein { max-width: 420px; }

body.leads .leads-rumpf { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
body.leads .leads-liste { display: block; min-width: 0; overflow-x: auto; }
.leads-tabelle { width: 100%; border-collapse: collapse; font-size: 13px; }
.leads-tabelle th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: .02em;
  padding: 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); white-space: nowrap; }
.leads-tabelle td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: break-word; }
.leads-tabelle td.mail { overflow-wrap: anywhere; min-width: 140px; }
.leads-tabelle td.datum { white-space: nowrap; color: var(--muted); }
.lead-zeile { cursor: pointer; }
.lead-zeile:hover { background: var(--card); }
.lead-zeile:focus-visible { outline: 2px solid var(--aiq-blue); outline-offset: -2px; }
.lead-zeile.an { background: var(--card); box-shadow: inset 4px 0 0 var(--aiq-blue); font-weight: 600; }
.lead-zeile a { color: inherit; text-decoration: none; font-weight: 600; }
.lead-zeile .status-bounce { color: var(--text); border-left: 3px solid var(--danger); padding-left: 6px; } /* aiq-ci E12 */
.lead-zeile .status-gesendet { color: var(--ok-text); }
.lead-zeile .fehlt { color: var(--warn-text); }

/* Rechts steht genau eine Karte: die gewählte Zeile. Mit Skript wählt desktop.js (.an),
   ohne Skript der Anker in der Zeile (:target). */
body.leads .leads-detail { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; min-width: 0; }
body.leads .leads-detail .lead-karte { display: none; margin: 0; }
body.leads .leads-detail .lead-karte.an { display: block; }
html:not(.js) body.leads .leads-detail .lead-karte:target { display: block; }
body.leads .leads-detail:has(.lead-karte.an) .leer,
html:not(.js) body.leads .leads-detail:has(.lead-karte:target) .leer { display: none; }
body.leads .leads-detail .btn { width: 100%; min-width: 0; }
body.leads .tastatur { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
body.leads .tastatur kbd { font-family: inherit; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; background: var(--card); }

/* ---- Prüfen: Fotos links, Felder rechts in zwei Spalten ----------------------------- */

body.pruefen main { max-width: 1180px; }
body.pruefen .pruef-raster { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 24px; align-items: start; }
body.pruefen .pruef-raster.ohne-bild { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
body.pruefen .pruef-bilder { position: sticky; top: 16px; }
body.pruefen .pruef-bilder .card.fotos { display: block; }
body.pruefen .pruef-bilder .card.fotos img { width: 100%; display: block; margin: 0 0 10px; }
body.pruefen .pruef-bilder .card.fotos img:last-child { margin-bottom: 0; }
body.pruefen .pruef-felder .card { margin-top: 0; }
body.pruefen .pruef-felder .card.zweispaltig { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
body.pruefen .pruef-felder .card.zweispaltig label.feld.voll { grid-column: 1 / -1; }
body.pruefen .pruef-felder input[type=text], body.pruefen .pruef-felder input[type=email],
body.pruefen .pruef-felder input[type=tel], body.pruefen .pruef-felder input[type=url],
body.pruefen .pruef-felder textarea { padding: 11px 12px; font-size: 15px; }
body.pruefen .pruef-felder .abschluss { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
body.pruefen .pruef-felder .abschluss .klein { margin: 0 !important; text-align: left !important; }

/* ---- Einstellungen (#98): Navigation links, Inhalt rechts ------------------------- */

body.einstellungen .einst-raster { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
body.einstellungen .einst-nav { position: sticky; top: 16px; flex-direction: column; gap: 4px; }
body.einstellungen .einst-nav .chip { border-radius: 10px; padding: 10px 14px; font-size: 15px; }
body.einstellungen .einst-nav .chip.an { background: var(--card); }
body.einstellungen .einst-abschnitt { scroll-margin-top: 16px; }
body.einstellungen .einst-abschnitt:first-child h2 { margin-top: 0; }
body.einstellungen .einst-felder { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; align-items: start; }
body.einstellungen .einst-felder dl, body.einstellungen .einst-felder .card { margin-top: 0; }
body.einstellungen .knopfzeile { flex-direction: row; flex-wrap: wrap; }
body.einstellungen .knopfzeile .btn { min-width: 0; }
body.einstellungen .einst-details form.sicht { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
body.einstellungen .einst-details form.sicht .klein, body.einstellungen .einst-details form.sicht label:last-of-type,
body.einstellungen .einst-details form.sicht .btn { grid-column: 1 / -1; }
body.einstellungen .einst-details form.sicht .btn { justify-self: start; }
body.einstellungen .konnektor { display: grid; grid-template-columns: 180px 1fr 1fr; gap: 0 16px; align-items: center; }
body.einstellungen .konnektor .feld { margin-bottom: 8px; }
body.einstellungen .konnektor input { padding: 9px 12px; font-size: 14px; }

/* ---- Produktdesign (Plattform #133): Seitenleiste in Navy links, Inhalt rechts ------------ */

body:has(> .seitenleiste) { display: grid; grid-template-columns: 240px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto; min-height: 100dvh; }
body:has(> .seitenleiste) > header { grid-column: 2; margin: 0; }
body:has(> .seitenleiste) > .seitenleiste { grid-column: 1; grid-row: 1 / -1; }
body:has(> .seitenleiste) > main { grid-column: 2; }
body:has(> .seitenleiste) > footer { grid-column: 2; }
.leiste { display: none; }
.seitenleiste { display: flex; flex-direction: column; gap: 4px; padding: 24px 16px; background: #101B33; color: #FFFFFF;
  position: sticky; top: 0; height: 100dvh; }
.seitenleiste .produkt { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin: 0 8px 28px; position: relative; }
/* Quadrat in Magenta unten auf der Grundlinie wie ein Punkt (Michael 08.11.2026), darunter das AI.quantex-Logo. */
.seitenleiste .produkt i { display: inline-block; width: 7px; height: 7px; background: var(--aiq-blue); vertical-align: baseline; margin-left: 2px; }
.seitenleiste .produkt small { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .72); }
.seitenleiste .produkt small img { height: 17px; width: auto; display: block; }
.seitenleiste > a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: rgba(255, 255, 255, .8);
  text-decoration: none; font-weight: 500; font-size: 15px; position: relative; }
.seitenleiste > a svg { width: 20px; height: 20px; }
.seitenleiste > a:hover { background: rgba(255, 255, 255, .06); color: #FFFFFF; }
.seitenleiste > a.an { background: #1C2947; color: #FFFFFF; font-weight: 600; }
.seitenleiste > a.an::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--aiq-blue); }
.seitenleiste .m365 { margin-top: auto; display: grid; grid-template-columns: 22px 1fr; gap: 0 10px; align-items: center;
  padding: 0 8px; font-size: 14px; font-weight: 600; }
.seitenleiste .m365 svg { width: 20px; height: 20px; grid-row: span 2; }
.seitenleiste .m365 small { font-weight: 400; color: rgba(255, 255, 255, .65); font-size: 12px; }

/* Startseite am Desktop: Kopfbereich ohne Ränder, Erfassen und Zuletzt nebeneinander. */
/* Am Desktop ist der Kopfbereich eine abgerundete Karte über die Inhaltsbreite statt eines Bands. */
body.start .held { margin: 8px 0 22px; padding: 26px 32px 28px; border-radius: 20px; }
body.start .erfassen-zweit .btn { min-width: 0; }
body.start .profil .knoepfe { flex-direction: row; flex-wrap: wrap; }
body.start .profil .knoepfe .btn { width: auto; }

/* Leads-Tabelle im Produktdesign (#133): zweite Zeile klein, Status als Marke. */
.leads-tabelle td .mail { display: block; color: var(--muted); font-size: 12px; font-weight: 400; overflow-wrap: anywhere; }
.leads-tabelle { background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--schatten); }
.leads-tabelle th { background: var(--card); }
.lead-zeile.an { background: color-mix(in srgb, var(--aiq-blue) 8%, white); }
