/* PRATCHradar – Design (übernommen aus PRATCHfinder, Pratch-CI über CSS-Variablen). */

/* Schriftart: Inter (selbst gehostet, DSGVO-konform) – wie der Fließtext auf pratch.de */
@font-face { font-family:'Inter'; font-style:normal; font-weight:400; font-display:swap; src:url('../fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:500; font-display:swap; src:url('../fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:600; font-display:swap; src:url('../fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:700; font-display:swap; src:url('../fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:800; font-display:swap; src:url('../fonts/inter-800.woff2') format('woff2'); }

:root {
    /* ── Pratch-CI ─────────────────────────────────────────────
       Dunkelblau #05133a · Hellgrün #9ad03e · Hellblau #44a1ee */
    --pf-primary:        #05133a;   /* Pratch Dunkelblau – Buttons, Navigation, Überschriften */
    --pf-primary-dark:   #0e2356;   /* Hover (etwas heller als Dunkelblau) */
    --pf-primary-soft:   #e7f1fc;   /* heller Blauton – Fokus/Hover-Flächen */
    --pf-accent:         #9ad03e;   /* Pratch Hellgrün – Akzente, Fortschritt, Erfolg */
    --pf-accent-dark:    #7fb52f;
    --pf-blue:           #1f6fc0;   /* Pratch Blau – Links (dunkler für besseren Kontrast/AA) */
    --pf-blue-light:     #44a1ee;   /* helles Pratch-Blau für Flächen/Akzente */
    --pf-ink:            #05133a;
    --pf-muted:          #6b7280;
    --pf-line:           #e5e7eb;
    --pf-bg:             #f3f6fb;
    --pf-card:           #ffffff;
    --pf-radius:         12px;
    --pf-shadow:         0 1px 3px rgba(5,19,58,.08), 0 1px 2px rgba(5,19,58,.06);
    --pf-sidebar:        #05133a;   /* Pratch Dunkelblau */
    --pf-sidebar-ink:    #c3cfe6;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--pf-bg);
    color: var(--pf-ink);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
/* Überschriften-Skala – ruhige, klare Hierarchie */
h1 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
a { color: var(--pf-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
    width: 240px; background: #fff; color: var(--pf-ink);
    display: flex; flex-direction: column; padding: 18px 14px; flex-shrink: 0;
    border-right: 1px solid var(--pf-line); box-shadow: 2px 0 12px rgba(5,19,58,.05);
}
.brand { display: block; background: transparent; padding: 6px 8px 2px; margin-bottom: 4px; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 100%; height: auto; display: block; }
.brand-sub { color: var(--pf-accent-dark); font-weight: 800; letter-spacing: .34em; font-size: 11px;
    text-transform: uppercase; text-align: center; margin: 0 0 22px; padding-left: .34em; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item { color: var(--pf-muted); padding: 10px 12px; border-radius: 8px;
    display: flex; align-items: center; gap: 10px; font-weight: 600;
    transition: background .12s ease, color .12s ease; }
.nav-item:hover { background: var(--pf-bg); text-decoration: none; color: var(--pf-ink); }
.nav-item.active { background: var(--pf-primary); color: #fff; }
.nav-icon { width: 18px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.nav-sep { color: #9aa3b2; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 14px 12px 6px; }
.sidebar-footer { border-top: 1px solid var(--pf-line); padding-top: 14px; }
.user { font-size: 13px; color: var(--pf-ink); font-weight: 600; margin-bottom: 4px; }
.btn-link { background: none; border: none; color: var(--pf-muted); cursor: pointer;
    padding: 0; font-size: 13px; }
.btn-link:hover { color: var(--pf-primary); text-decoration: underline; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { background: var(--pf-card); border-bottom: 1px solid var(--pf-line);
    padding: 16px 28px; }
.topbar h1 { margin: 0; font-size: 20px; }
.content { padding: 24px 28px; max-width: 1100px; width: 100%; }

/* Karten */
.card { background: var(--pf-card); border: 1px solid var(--pf-line);
    border-radius: var(--pf-radius); box-shadow: var(--pf-shadow); padding: 20px; margin-bottom: 20px; }
.card h2, .card h3 { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }

/* Statistik-Kacheln */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { background: var(--pf-card); border: 1px solid var(--pf-line); border-radius: var(--pf-radius);
    padding: 18px; box-shadow: var(--pf-shadow); }
.stat .num { font-size: 30px; font-weight: 800; color: var(--pf-primary); }
.stat .lbl { color: var(--pf-muted); font-size: 13px; }
a.stat { display: block; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
a.stat:hover { transform: translateY(-2px); border-color: var(--pf-primary); box-shadow: 0 6px 18px rgba(5,19,58,.12); }
a.stat .lbl { display: inline-flex; align-items: center; gap: 5px; }
a.stat .lbl::after { content: "→"; opacity: 0; transition: opacity .12s ease; }
a.stat:hover .lbl::after { opacity: .6; }

/* Tabellen */
table.list { width: 100%; border-collapse: collapse; background: var(--pf-card);
    border-radius: var(--pf-radius); overflow: visible; box-shadow: var(--pf-shadow); }
table.list th, table.list td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--pf-line); }
table.list th { background: #fafbfc; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--pf-muted); }
table.list th:first-child { border-top-left-radius: var(--pf-radius); }
table.list th:last-child { border-top-right-radius: var(--pf-radius); }
table.list tr:last-child td { border-bottom: none; }
table.list tr:hover td { background: #fafbff; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--pf-primary); color: #fff;
    border: none; padding: 9px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 14px; }
.btn:hover { background: var(--pf-primary-dark); text-decoration: none; color: #fff; }
.btn-secondary { background: #fff; color: var(--pf-ink); border: 1px solid var(--pf-line); }
.btn-secondary:hover { background: #f3f4f6; color: var(--pf-ink); }
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 5px 10px; font-size: 13px; }

/* Formulare */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 14px; }
.form-group .hint { color: var(--pf-muted); font-size: 12px; font-weight: 400; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number],
select, textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--pf-line); border-radius: 8px;
    font-size: 14px; font-family: inherit; background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pf-primary);
    box-shadow: 0 0 0 3px var(--pf-primary-soft); }
textarea { resize: vertical; min-height: 80px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 200px; }

/* Badges */
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
    max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; text-align: center; }
.badge-fixed { width: 210px; max-width: 210px; }
/* Kalibrierte, einheitliche Palette: gleiche Sättigung, gleiche Bedeutung → gleiche Farbe.
   neu/verfügbar = blau (info) · gespräch/entwurf = amber · profil_fertig = violett ·
   aktiv/versendet/vermittelt = grün (erfolg) · abgelehnt = rot · inaktiv/beendet = neutral. */
.badge-neu { background: #e6f1fb; color: #185fa5; }
.badge-gespraech { background: #faeeda; color: #854f0b; }
.badge-profil_fertig { background: #eeedfe; color: #3c3489; }
.badge-versendet { background: #eaf3de; color: #3b6d11; }
.badge-abgelehnt { background: #f6e7ea; color: #a3282c; }
.badge-aktiv { background: #eaf3de; color: #3b6d11; }
.badge-inaktiv { background: #eef2f7; color: #64748b; }
.badge-beendet { background: #eef2f7; color: #334155; }
.badge-entwurf { background: #faeeda; color: #854f0b; }
.badge-verfuegbar { background: #e6f1fb; color: #185fa5; }
.badge-vermittelt { background: #eaf3de; color: #3b6d11; }
.badge-gesendet { background: #eef2f7; color: #334155; }
.badge-freigeschaltet { background: #eaf3de; color: #3b6d11; }
.badge-abgeschlossen { background: #e6f1fb; color: #185fa5; }
.badge-storniert { background: #f6e7ea; color: #a3282c; }

/* Flash */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-weight: 500; }
.flash-success { background: #dcfce7; color: #166534; }
.flash-error { background: #fee2e2; color: #991b1b; }

/* Diverses */
.muted { color: var(--pf-muted); }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }

/* Einheitlicher Seitenkopf: Kontext/Beschreibung links, Primär-Aktion rechts (Paket C) */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head .ph-desc { color: var(--pf-muted); font-size: 13px; margin: 3px 0 0; }
.page-head .ph-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Ruhige Filter-/Suchleiste (Paket C) */
.filterbar { background: var(--pf-card); border: 1px solid var(--pf-line); border-radius: var(--pf-radius);
    padding: 12px 16px; margin-bottom: 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filterbar .fb-count { color: var(--pf-muted); font-size: 12.5px; margin-left: auto; }

/* Rechtsbündige Aktionsspalte in Listen (Paket A) – Spezifität muss `table.list td` schlagen */
table.list td.list-actions, td.list-actions { text-align: right; white-space: nowrap; }
td.list-actions .btn, td.list-actions .rowmenu, td.list-actions .inline-form { vertical-align: middle; }
td.list-actions .btn, td.list-actions .rowmenu { margin-left: 5px; }
/* Dezente Zusatzinfo unter Zellinhalten (Firma, „geöffnet vor …") */
.cell-sub { color: var(--pf-muted); font-size: 11.5px; margin-top: 3px; }
.cell-note { font-size: 11.5px; margin-top: 4px; }
.cell-note.warn { color: #b45309; }
.cell-note.mute { color: #94a3b8; }

/* Topbar-Kontext-Chip (Paket E) */
.topbar { display: flex; align-items: center; gap: 10px; }
.topbar .ctx { color: var(--pf-muted); font-size: 12.5px; font-weight: 500; background: var(--pf-bg);
    border: 1px solid var(--pf-line); padding: 2px 11px; border-radius: 999px; }

/* Verwaltung: Sekundär-Navigation (Sub-Menü über allen Verwaltungsseiten) */
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--pf-line); }
.subnav-item { font-size: 13px; font-weight: 600; color: var(--pf-muted); padding: 6px 12px; border-radius: 8px;
    background: var(--pf-card); border: 1px solid var(--pf-line); transition: background .12s ease, color .12s ease; }
.subnav-item:hover { background: var(--pf-bg); color: var(--pf-ink); text-decoration: none; }
.subnav-item.active { background: var(--pf-primary); color: #fff; border-color: var(--pf-primary); }

/* Verwaltung: Hub-Kacheln (Übersichtsseite) */
.hub-group { margin-bottom: 22px; }
.hub-group h3 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--pf-muted); font-weight: 700; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.hub-tile { display: flex; gap: 12px; align-items: flex-start; background: var(--pf-card); border: 1px solid var(--pf-line);
    border-radius: 12px; padding: 16px; box-shadow: var(--pf-shadow);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.hub-tile:hover { transform: translateY(-2px); border-color: var(--pf-primary); box-shadow: 0 6px 18px rgba(5,19,58,.12); text-decoration: none; }
.hub-ic { width: 38px; height: 38px; border-radius: 9px; background: var(--pf-primary-soft); color: var(--pf-primary);
    display: flex; align-items: center; justify-content: center; flex: none; }
.hub-txt { display: flex; flex-direction: column; }
.hub-t { font-weight: 700; color: var(--pf-ink); font-size: 14px; }
.hub-d { color: var(--pf-muted); font-size: 12.5px; margin-top: 2px; }

/* Häkchen-Mehrfachauswahl (Filter mit mehreren Werten) */
.msel { position: relative; display: inline-block; }
.msel-btn { width: 100%; display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
    background: #fff; border: 1px solid var(--pf-line); border-radius: 8px; padding: 10px 12px;
    font-size: 14px; font-family: inherit; color: var(--pf-ink); cursor: pointer; }
.msel-btn:hover { background: var(--pf-bg); }
.msel-caret { color: var(--pf-muted); font-size: 11px; }
.msel-panel { display: none; position: absolute; z-index: 40; top: 100%; left: 0; margin-top: 4px;
    min-width: 230px; max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid var(--pf-line);
    border-radius: 10px; box-shadow: 0 8px 24px rgba(5,19,58,.16); padding: 6px; }
.msel.open .msel-panel { display: block; }
.msel-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px;
    font-size: 13.5px; font-weight: 400; cursor: pointer; white-space: nowrap; }
.msel-opt:hover { background: var(--pf-bg); }
.msel-opt input { width: auto; }
.empty { text-align: center; padding: 40px; color: var(--pf-muted); }
.pill-link { font-size: 13px; }
.qa-item { padding: 10px 0; border-bottom: 1px solid var(--pf-line); }
.qa-item:last-child { border-bottom: none; }
/* Funnel-Builder-Wizard */
.wz-stepper { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:16px; }
.wz-stepper button { background:#fff; border:1px solid var(--pf-line); border-radius:8px; padding:7px 12px;
    font-size:13px; font-weight:600; color:var(--pf-muted); cursor:pointer; display:inline-flex; align-items:center; gap:6px; }
.wz-stepper button:hover { background:#eef1f7; }
.wz-stepper button.active { background:var(--pf-primary); color:#fff; border-color:var(--pf-primary); }
.wz-stepper button.done { color:var(--pf-accent-dark); border-color:var(--pf-accent); }
.wz-stepnum { width:20px; height:20px; border-radius:50%; background:var(--pf-bg); color:var(--pf-muted);
    display:inline-flex; align-items:center; justify-content:center; font-size:11px; }
.wz-stepper button.active .wz-stepnum { background:rgba(255,255,255,.25); color:#fff; }
.wz-nav { position:sticky; bottom:0; z-index:20; background:#fff; border-top:1px solid var(--pf-line);
    padding:12px 0; display:flex; gap:10px; align-items:center; margin-top:12px; }
.wz-nav .wz-navlabel { color:var(--pf-muted); font-size:13px; margin:0 auto; }
.wz-phone-wrap { float:right; width:248px; margin:0 0 14px 18px; position:sticky; top:12px; }
.wz-phone { border:7px solid #1f2937; border-radius:26px; background:#fff; overflow:hidden; box-shadow:0 8px 24px rgba(5,19,58,.18); }
.wz-phone .wz-scr { min-height:360px; display:flex; flex-direction:column; }
.wz-phone .wz-hd { padding:14px; color:#fff; }
.wz-phone .wz-bd { padding:16px 14px 20px; flex:1; }
.wz-pv-opt { border:1px solid #e5e7eb; border-radius:8px; padding:9px 10px; font-size:12px; margin-bottom:8px; }
.wz-pv-btn { text-align:center; border-radius:8px; padding:10px; font-size:12px; font-weight:700; margin-top:12px; }
.wz-pv-field { border:1px solid #e5e7eb; border-radius:8px; padding:8px 10px; font-size:11px; color:#9ca3af; margin-bottom:8px; }
@media (max-width:820px){ .wz-phone-wrap { float:none; width:100%; max-width:260px; margin:0 auto 14px; position:static; } }

/* Modal (z. B. Lead löschen) */
.pf-modal { position: fixed; inset: 0; background: rgba(5,19,58,.45); z-index: 80;
    display: flex; align-items: center; justify-content: center; padding: 16px; }
.pf-modal-card { background: #fff; border-radius: 14px; padding: 22px 24px; width: 440px; max-width: 100%;
    box-shadow: 0 20px 50px rgba(5,19,58,.35); }
.pf-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.pf-modal-x { background: none; border: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--pf-muted); }
.pf-modal-x:hover { color: var(--pf-ink); }
/* Zeilen-Aktionsmenü (•••) */
.rowmenu { position: relative; display: inline-block; }
.rowmenu-items { display: none; position: absolute; right: 0; top: 100%; margin-top: 4px; min-width: 180px;
    background: #fff; border: 1px solid var(--pf-line); border-radius: 10px; box-shadow: 0 8px 24px rgba(5,19,58,.16);
    z-index: 30; overflow: hidden; }
.rowmenu.open .rowmenu-items { display: block; }
.rowmenu-items a, .rowmenu-items button { display: block; width: 100%; text-align: left; background: none; border: none;
    padding: 10px 14px; font-size: 14px; color: var(--pf-ink); cursor: pointer; text-decoration: none; }
.rowmenu-items a:hover, .rowmenu-items button:hover { background: var(--pf-bg); }
.rowmenu-items .danger { color: #dc2626; border-top: 1px solid var(--pf-line); }

table.kv { width: 100%; border-collapse: collapse; }
table.kv td { padding: 7px 0; border-bottom: 1px solid var(--pf-line); vertical-align: top; font-size: 14px; }
table.kv tr:last-child td { border-bottom: none; }
table.kv td:first-child { width: 38%; white-space: nowrap; padding-right: 12px; }
.qa-q { color: var(--pf-muted); font-size: 13px; }
.qa-a { font-weight: 600; }
.inline-form { display: inline; }
.flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* Aktions-Zelle in Listen-Tabellen: das globale .flex würde die <td> zum Flex-Container
   machen und aus dem Tabellenraster werfen (Spalten verrutschen). Auf dem Desktop wieder
   als echte Tabellenzelle rendern – die Buttons sind ohnehin inline (.btn/.inline-form/
   .rowmenu) und fließen nebeneinander. Die Mobil-Karten-Ansicht (max-width:820px) nutzt
   td.flex bewusst weiter und bleibt unberührt. */
@media (min-width: 821px) {
    table.list td.flex { display: table-cell; white-space: nowrap; vertical-align: middle; }
    table.list td.flex > * { margin: 3px 8px 3px 0; }
    table.list td.flex > *:last-child { margin-right: 0; }
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
/* Rich-Text-Editor */
.rt-wrap { border: 1px solid var(--pf-line); border-radius: 8px; overflow: hidden; background: #fff; }
.rt-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: #f8fafc; border-bottom: 1px solid var(--pf-line); }
.rt-toolbar button, .rt-toolbar select { border: 1px solid var(--pf-line); background: #fff; border-radius: 6px;
    padding: 4px 8px; cursor: pointer; font-size: 13px; line-height: 1.2; }
.rt-toolbar button:hover { background: #eef1f7; }
.rt-toolbar button.rt-active { background: var(--pf-primary); color: #fff; border-color: var(--pf-primary); }
.rt-editor { min-height: 160px; padding: 12px 14px; font-size: 14px; line-height: 1.6; outline: none; }
.rt-editor:focus { box-shadow: inset 0 0 0 2px var(--pf-primary-soft); }
.rt-editor h2 { font-size: 20px; margin: 12px 0 6px; }
.rt-editor h3 { font-size: 16px; margin: 10px 0 6px; }
.rt-editor a { color: var(--pf-blue); }

/* Klebende Speicher-Leiste – bleibt beim Scrollen sichtbar */
.save-bar {
    position: sticky; bottom: 12px; z-index: 20;
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    margin-top: 16px; padding: 12px 16px;
    background: rgba(255,255,255,.97);
    border: 1px solid var(--pf-line); border-radius: 12px;
    box-shadow: 0 8px 24px rgba(5,19,58,.12);
}
.save-bar kbd {
    background: #f1f5f9; border: 1px solid var(--pf-line); border-bottom-width: 2px;
    border-radius: 5px; padding: 1px 6px; font-size: 12px; font-family: inherit; color: #334155;
}

/* Lead-Qualifizierung: nummerierte Fragen + prominenter Telefon-Block */
.q-num { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
    background: var(--pf-primary); color: #fff; font-size: 11px; font-weight: 700; margin-right: 6px; vertical-align: 1px; }
.tel-card { border-left: 5px solid var(--pf-accent); }
.tel-card .q-num { background: #4a7d10; }
.tel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
@media (max-width: 720px) { .tel-grid { grid-template-columns: 1fr; } }

/* Einfarbige Inline-Icons (erben die Textfarbe) */
.ic { display: inline-block; vertical-align: -0.15em; flex: none; }
h2 .ic, h3 .ic { vertical-align: -0.12em; }

.btn-tab { padding: 8px 14px; border-radius: 8px; color: var(--pf-muted); font-weight: 600; }
.btn-tab:hover { background: #eef1f7; text-decoration: none; }
.btn-tab.active { background: var(--pf-primary); color: #fff; }
.standort-row { border: 1px solid var(--pf-line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: #fafbfc; }
.fragen-list { counter-reset: frage; }
.frage-row { position: relative; border: 1px solid #cdddf2; border-left: 4px solid var(--pf-primary);
    border-radius: 10px; padding: 18px 14px 14px; margin-bottom: 14px; background: #eef4fc; counter-increment: frage; }
.frage-row::before { content: "Frage " counter(frage); position: absolute; top: 10px; right: 12px;
    background: var(--pf-primary); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .03em;
    padding: 2px 9px; border-radius: 999px; }
.frage-row input, .frage-row select, .frage-row textarea { background: #fff; }
.frage-drag { display: inline-flex; align-items: center; gap: 6px; cursor: grab; color: var(--pf-muted);
    padding: 0 0 8px; user-select: none; }
.frage-drag:active { cursor: grabbing; }
.frage-row.dragging { opacity: .45; outline: 2px dashed var(--pf-primary); }
code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
/* Hamburger – nur mobil sichtbar */
.nav-toggle { display: none; background: #fff; border: 1px solid var(--pf-line); border-radius: 8px;
    width: 42px; height: 42px; font-size: 22px; line-height: 1; cursor: pointer; color: var(--pf-ink);
    align-items: center; justify-content: center; flex-shrink: 0; }
.nav-overlay { display: none; }

@media (max-width: 820px) {
    /* Sidebar als einklappbares Off-Canvas-Menü */
    .sidebar {
        position: fixed; top: 0; left: 0; bottom: 0; width: 250px; z-index: 60;
        transform: translateX(-100%); transition: transform .25s ease; overflow-y: auto;
    }
    body.nav-open .sidebar { transform: translateX(0); }
    .nav-overlay { display: block; position: fixed; inset: 0; z-index: 55;
        background: rgba(5,19,58,.45); opacity: 0; visibility: hidden; transition: opacity .25s ease; }
    body.nav-open .nav-overlay { opacity: 1; visibility: visible; }

    .nav-toggle { display: inline-flex; }
    .topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; position: sticky; top: 0; z-index: 40; }
    .topbar h1 { font-size: 18px; }
    .content { padding: 16px 14px; }

    .grid-2 { grid-template-columns: 1fr; }
    .row > * { min-width: 100%; }           /* Formularfelder stapeln statt überlappen */
    .toolbar { gap: 8px; }

    /* Breite Tabellen in voller Breite rendern (nicht in eine Scroll-Box sperren),
       damit man per Rauszoomen alle Spalten auf einen Blick sieht. */
    .content table.list { white-space: nowrap; width: auto; min-width: 100%; }

    /* Karten-Ansicht: jede Zeile wird ein gestapelter Block (kein Querscrollen).
       Pro Feld "Label: Wert" via data-label. */
    .content table.cards-mobile { display: block; width: 100%; min-width: 0; white-space: normal; background: transparent; box-shadow: none; }
    .content table.cards-mobile thead { display: none; }
    .content table.cards-mobile tbody { display: block; }
    .content table.cards-mobile tr {
        display: block; background: var(--pf-card); border: 1px solid var(--pf-line);
        border-radius: 12px; padding: 8px 14px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(5,19,58,.05);
    }
    .content table.cards-mobile tr:hover td { background: transparent; }
    .content table.cards-mobile td {
        display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
        border: none; padding: 7px 0; white-space: normal; text-align: right;
        border-bottom: 1px solid var(--pf-line);
    }
    .content table.cards-mobile td:last-child { border-bottom: none; }
    .content table.cards-mobile td::before {
        content: attr(data-label); font-weight: 600; color: var(--pf-muted);
        font-size: 13px; text-align: left; flex-shrink: 0;
    }
    /* Aktions-/Leer-Zellen (ohne Label): Buttons links, kein Label */
    .content table.cards-mobile td.flex,
    .content table.cards-mobile td[data-label=""] { justify-content: flex-start; padding-top: 10px; flex-wrap: wrap; }
    .content table.cards-mobile td.flex::before,
    .content table.cards-mobile td[data-label=""]::before { display: none; }

    /* iOS zoomt bei <16px beim Fokus rein – verhindern */
    input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number],
    select, textarea { font-size: 16px; }
}

/* ── PRATCHradar ─────────────────────────────────────────────── */
.content { max-width: 1240px; }
.score { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 28px; padding: 0 8px;
    border-radius: 999px; font-weight: 800; font-size: 13px; color: #fff; }
.score-hi  { background: #3b6d11; }
.score-mid { background: #c27c0e; }
.score-lo  { background: #a3282c; }
.score-none { background: #e5e7eb; color: #64748b; }
.t-title { color: var(--pf-ink); font-weight: 600; }
.t-title:hover { color: var(--pf-blue); }
.log-line { font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--pf-line); }
.log-line:last-child { border-bottom: none; }
.log-line .badge { min-width: 52px; margin-right: 6px; }
.status-pick { display: inline-flex; align-items: center; gap: 6px; font-weight: 500 !important; font-size: 14px;
    border: 1px solid var(--pf-line); border-radius: 8px; padding: 6px 12px; cursor: pointer; margin: 0 !important; }
.status-pick input { width: auto; margin: 0; }
.status-pick:has(input:checked) { border-color: var(--pf-primary); background: var(--pf-primary-soft); }
.desc { font-size: 14px; line-height: 1.6; white-space: normal; overflow-wrap: anywhere; }
