/* ===== Grundlagen ===================================================== */
:root {
  --brand: #0f766e;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --soft: #f8fafc;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --info: #2563eb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .18);
  --sidebar: 232px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font: 14px/1.5 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 650; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15px; } h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
p { margin: 0 0 .8em; }
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
pre { background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: 8px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .center { text-align: center; } .right { text-align: right; }
.nowrap { white-space: nowrap; } .hidden { display: none !important; } .w100 { width: 100%; }
.mt0{margin-top:0}.mt1{margin-top:8px}.mt2{margin-top:16px}.mt3{margin-top:24px}.mb0{margin-bottom:0}.mb1{margin-bottom:8px}.mb2{margin-bottom:16px}

/* ===== Layout ========================================================= */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: #0f172a; color: #cbd5e1; display: flex; flex-direction: column; z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px; color: #fff; font-weight: 650; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,.06); }
.brand:hover { text-decoration: none; }
.brand img { max-height: 30px; max-width: 120px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); display: grid; place-items: center; font-size: 13px; }
.sidebar nav { padding: 10px 8px; flex: 1; overflow-y: auto; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 8px 12px; color: #cbd5e1; border-radius: 8px; margin-bottom: 2px; font-weight: 500; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.sidebar nav a.active { background: var(--brand); color: #fff; }
.sidebar nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sidebar .count { margin-left: auto; font-style: normal; background: rgba(255,255,255,.15); color: #fff; font-size: 11px; padding: 0 7px; border-radius: 10px; }
.sidebar-foot { padding: 10px 18px; font-size: 11px; color: #475569; }
.main { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; background: var(--panel); border-bottom: 1px solid var(--line); height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 22px; }
.topbar .search { flex: 1; max-width: 420px; }
.topbar .search input { width: 100%; background: var(--soft); }
.studio-switch select { font-weight: 600; min-width: 160px; }
.studio-name { font-weight: 600; }
.user-menu { margin-left: auto; position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu .dropdown { position: absolute; right: 0; top: 42px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 8px; min-width: 190px; }
.user-menu .dropdown a, .user-menu .dropdown div { display: block; padding: 7px 10px; border-radius: 6px; }
.user-menu .dropdown a:hover { background: var(--soft); text-decoration: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-grid; place-items: center; font-size: 12px; font-weight: 650; flex: none; }
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.menu-toggle { display: none; }
.content { padding: 22px; max-width: 1600px; width: 100%; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { background: var(--panel); width: 100%; max-width: 380px; padding: 30px; border-radius: 14px; box-shadow: var(--shadow-lg); }
.auth-brand { text-align: center; margin-bottom: 18px; } .auth-brand img { max-height: 48px; margin-bottom: 10px; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }

/* ===== Karten & Raster ================================================ */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card.flush { padding: 0; } .card.flush > .card-head { padding: 14px 18px 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 1fr) 340px; }
.grid-sidebar-left { grid-template-columns: 300px minmax(0, 1fr); }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi .value { font-size: 26px; font-weight: 700; margin-top: 2px; letter-spacing: -.01em; }
.kpi .delta { font-size: 12px; } .delta.up { color: var(--ok); } .delta.down { color: var(--err); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* ===== Formulare ====================================================== */
label { display: block; font-weight: 550; font-size: 13px; }
label > input, label > select, label > textarea { margin-top: 5px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=url], input[type=tel], input[type=date], input[type=datetime-local], input[type=time], input[type=color], select, textarea {
  width: 100%; font: inherit; color: inherit; background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; min-height: 36px; transition: border-color .15s, box-shadow .15s;
}
input[type=color] { padding: 2px; width: 60px; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.field-hint { font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 450; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--brand); }
.inline-form { display: inline; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 0 0 14px; }
legend { font-weight: 650; padding: 0 6px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.switch input { appearance: none; width: 36px; height: 20px; background: var(--line-strong); border-radius: 20px; position: relative; transition: background .15s; cursor: pointer; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: left .15s; }
.switch input:checked { background: var(--brand); } .switch input:checked::after { left: 18px; }

/* ===== Buttons ======================================================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 550; padding: 7px 14px; min-height: 36px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; color: var(--text); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--soft); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 85%, #000); }
.btn-danger { color: var(--err); border-color: #fecaca; } .btn-danger:hover { background: #fef2f2; }
.btn-ghost { border-color: transparent; background: transparent; } .btn-ghost:hover { background: var(--soft); }
.btn-sm { padding: 4px 10px; min-height: 28px; font-size: 12.5px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn-wa { background: #25d366; border-color: #25d366; color: #fff; } .btn-wa:hover { background: #1fb457; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn { border: 0; background: transparent; cursor: pointer; font-size: 18px; padding: 6px; border-radius: 6px; color: var(--muted); }
.icon-btn:hover { background: var(--soft); color: var(--text); }

/* ===== Tabellen ======================================================= */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; background: var(--soft); white-space: nowrap; }
.table tr:hover td { background: #fbfdff; }
.table td.actions { text-align: right; white-space: nowrap; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.card.flush .table th:first-child, .card.flush .table td:first-child { padding-left: 18px; }
.card.flush .table th:last-child, .card.flush .table td:last-child { padding-right: 18px; }

/* ===== Badges, Chips, Flash =========================================== */
.badge { display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 11.5px; font-weight: 600; line-height: 18px; white-space: nowrap; }
.badge-gray { background: #f1f5f9; color: #475569; } .badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #dcfce7; color: #15803d; } .badge-red { background: #fee2e2; color: #b91c1c; }
.badge-amber { background: #fef3c7; color: #b45309; } .badge-purple { background: #ede9fe; color: #6d28d9; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: #eef2f7; color: #334155; border-left: 3px solid var(--tag, #94a3b8); }
.tag .x { cursor: pointer; opacity: .6; } .tag .x:hover { opacity: 1; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-weight: 500; border: 1px solid; }
.flash-ok { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.flash-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.flash-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.flash-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty h2 { color: var(--text); }
.callout { background: var(--soft); border: 1px dashed var(--line-strong); border-radius: 10px; padding: 12px 14px; }

/* ===== Tabs ============================================================ */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.settings-nav { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; position: sticky; top: 74px; }
.settings-nav .group { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 10px 4px; font-weight: 600; }
.settings-nav a { display: block; padding: 7px 10px; border-radius: 7px; color: var(--text); }
.settings-nav a:hover { background: var(--soft); text-decoration: none; }
.settings-nav a.active { background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand); font-weight: 600; }

/* ===== Kanban ========================================================== */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; min-height: calc(100vh - 200px); }
.kcol { flex: 0 0 272px; background: #eef1f5; border-radius: 10px; display: flex; flex-direction: column; max-height: calc(100vh - 190px); }
.kcol-head { padding: 10px 12px 8px; border-top: 3px solid var(--c, #94a3b8); border-radius: 10px 10px 0 0; }
.kcol-head .t { font-weight: 650; display: flex; justify-content: space-between; gap: 6px; }
.kcol-head .s { font-size: 12px; color: var(--muted); }
.kcol-body { padding: 4px 8px 10px; overflow-y: auto; flex: 1; min-height: 60px; }
.kcol-body.drag-over { background: color-mix(in srgb, var(--brand) 10%, transparent); border-radius: 0 0 10px 10px; }
.kcard { background: #fff; border-radius: 8px; padding: 9px 10px; margin-bottom: 7px; box-shadow: var(--shadow); cursor: grab; border: 1px solid transparent; }
.kcard:hover { border-color: var(--line-strong); }
.kcard.dragging { opacity: .45; }
.kcard .n { font-weight: 600; color: var(--text); display: block; }
.kcard .meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.kcard.rotting { border-left: 3px solid var(--err); }
.kcard .tags { margin-top: 5px; display: flex; gap: 4px; flex-wrap: wrap; }

/* ===== Zeitleiste ===================================================== */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .ic { width: 30px; height: 30px; border-radius: 50%; background: var(--soft); border: 1px solid var(--line); display: grid; place-items: center; font-size: 13px; color: var(--muted); }
.timeline .ic.t-wa_in, .timeline .ic.t-wa_out { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.timeline .ic.t-email_out, .timeline .ic.t-email_in { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.timeline .ic.t-aidoo { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.timeline .ic.t-ai { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
.timeline .head { display: flex; justify-content: space-between; gap: 8px; }
.timeline .head b { font-weight: 600; }
.timeline .body { margin-top: 4px; white-space: pre-wrap; word-break: break-word; color: #334155; }
.timeline .body.html { white-space: normal; }

/* ===== Modal =========================================================== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal { background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow: auto; }
.modal.lg { max-width: 860px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

/* ===== Sonstiges ======================================================= */
.pager { display: flex; gap: 4px; justify-content: center; margin: 16px 0 4px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 32px; padding: 5px 9px; border-radius: 7px; text-align: center; border: 1px solid var(--line); background: #fff; }
.pager .cur { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager .dots { border: 0; background: transparent; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters > * { flex: 0 1 auto; }
.filters input, .filters select { min-width: 140px; }
.copy-box { display: flex; gap: 6px; }
.copy-box input, .copy-box textarea { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--soft); }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; }
.dl dt { color: var(--muted); font-size: 12.5px; } .dl dd { margin: 0; word-break: break-word; }
.progress { height: 8px; background: var(--line); border-radius: 8px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 200px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c, #94a3b8); }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.list-plain li:last-child { border-bottom: 0; }
.sortable-handle { cursor: grab; color: var(--muted); padding: 0 6px; user-select: none; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-output { line-height: 1.6; }
.ai-output h1, .ai-output h2, .ai-output h3 { margin-top: 1em; }
.ai-output ul { padding-left: 20px; }
.step-card { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 12px 14px; position: relative; }
.step-connector { width: 2px; height: 18px; background: var(--line-strong); margin: 0 auto; }
.step-card .step-type { font-weight: 650; display: flex; align-items: center; gap: 8px; }
.step-card .step-num { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 11px; display: grid; place-items: center; }

/* ===== Responsiv ======================================================= */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-sidebar, .grid-sidebar-left { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-block; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; }
  .topbar .uname { display: none; }
  .content { padding: 16px; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .topbar .search { display: none; }
  .topbar .search-toggle { display: inline-flex; }
  .search-toggle + .user-menu { margin-left: 0; }
  body.search-open .topbar .search { display: block; position: absolute; left: 0; right: 0; top: 0; height: 56px; max-width: none; padding: 9px 12px; background: var(--panel); z-index: 5; }
  body.search-open .topbar .search input { font-size: 16px; } /* verhindert Zoom auf iOS */
  .gs-drop { position: fixed; left: 8px; right: 8px; top: 56px; max-height: calc(100vh - 70px); }
}
label > input[type=color] { display: block; }
.settings-main { min-width: 0; }
body.has-nav .content { padding-bottom: 96px; } /* Platz für den Assistenten-Button */
.page-head .actions select, .page-head .actions input:not([type=checkbox]) { width: auto; min-width: 0; }
.page-head form.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.team-table th, .team-table td { padding: 8px 9px; font-size: 13px; }

/* v2.4: Quelle auf der Pipeline-Karte */
.kcard .src{display:inline-block;max-width:100%;margin-top:4px;padding:1px 7px;border-radius:99px;font-size:11px;line-height:1.6;background:#f1f5f9;color:#475569;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:top}
.kcard .src + .src{margin-left:4px}
.kcard .src-meta{background:#e0e7ff;color:#3730a3}.kcard .src-google{background:#fef3c7;color:#92400e}.kcard .src-ref{background:#dcfce7;color:#166534}
.kcard .src-aidoo{background:#ffedd5;color:#9a3412}.kcard .src-web{background:#e0f2fe;color:#075985}.kcard .src-wa{background:#d1fae5;color:#065f46}
.kcard .src-form{background:#f5f3ff;color:#5b21b6}

/* ===== v2.6 Suche ===================================================== */
.topbar .search { position: relative; }
.search-toggle { display: none; align-items: center; justify-content: center; margin-left: auto; }
.gs-drop { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); max-height: 70vh; overflow-y: auto; z-index: 40; }
.gs-drop .gs-h { padding: 8px 12px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; display: flex; justify-content: space-between; }
.gs-drop a { display: block; padding: 7px 12px; color: inherit; text-decoration: none; border-top: 1px solid var(--line); }
.gs-drop a:hover, .gs-drop a.act { background: var(--soft); }
.gs-drop a b { display: block; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-drop a span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-drop .gs-all { font-weight: 600; color: var(--brand); text-align: center; }
.gs-drop .gs-empty { padding: 12px; color: var(--muted); font-size: 13px; }
.search-row { display: flex; flex-direction: column; gap: 1px; padding: 9px 18px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.search-row:hover { background: var(--soft); text-decoration: none; }
.search-group { margin-bottom: 14px; }
mark { background: color-mix(in srgb, var(--brand) 25%, #fff); color: inherit; padding: 0 1px; border-radius: 2px; }
.search-hit { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-filter input[type=search] { flex: 1 1 220px; }
@media (max-width: 560px) {
  .list-filter { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .list-filter input[type=search] { grid-column: 1 / -1; }
  .list-filter select { min-width: 0; }
  .list-filter button[type=submit] { display: none; }
  .list-filter .btn-ghost { grid-column: 1 / -1; justify-self: start; }
}
/* v2.7: Filterzeile auf breiten Bildschirmen einzeilig */
@media (min-width: 561px) {
  .list-filter { align-items: center; }
  .list-filter input[type=search] { width: auto; flex: 1 1 260px; min-width: 200px; }
  .list-filter select { width: auto; flex: 0 1 220px; }
  .list-filter .btn { flex: none; }
}

/* v2.20.1: hidden-Attribut gewinnt immer (sonst überschreibt z. B. .btn{display:inline-flex}) */
[hidden]{display:none!important}
/* v2.27 Wissensdatenbank: Sammelaktionen */
.kb-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 10px; position: sticky; top: 0; z-index: 5; }
.kb-bulk select { width: auto; min-width: 240px; }
.kb-table td:first-child { vertical-align: top; padding-top: 14px; }
/* v2.30 Mitarbeiterverzeichnis: Suchauswahl */
.sd-results { position: absolute; z-index: 30; left: 0; right: 0; background: var(--panel, #fff); border: 1px solid var(--line, #e2e8f0); border-radius: 10px; box-shadow: 0 8px 24px rgba(15,23,42,.12); max-height: 320px; overflow: auto; }
.sd-item { display: block; padding: 8px 10px; border-bottom: 1px solid var(--line, #eef2f7); color: inherit; text-decoration: none; font-size: 13.5px; cursor: pointer; }
.sd-item:hover { background: var(--bg, #f8fafc); }
.sd-item:last-child { border-bottom: 0; }
.btn-warn{background:#fff7ed;border-color:#fdba74;color:#9a3412}.btn-warn:hover{background:#ffedd5}
/* v2.53: 16:9-Vorschau für Bildschirm-Inhalte */
.dpv-box{position:relative;aspect-ratio:16/9;border-radius:10px;overflow:hidden;background:#0b1220;box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)}
.dpv-box iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.dpv-box.mini iframe{pointer-events:none}
/* v2.65: Push-Benachrichtigungen im Profil */
.push-device{display:flex;align-items:center;gap:14px;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:linear-gradient(180deg,#fff,var(--soft))}
.push-device-ico{flex:0 0 44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--brand) 12%,#fff);color:var(--brand)}
.push-device-txt{flex:1;min-width:0}
.push-topics{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:8px}
.push-topic{padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;line-height:1.35}
.push-topic:has(input:checked){border-color:color-mix(in srgb,var(--brand) 45%,#fff);background:color-mix(in srgb,var(--brand) 5%,#fff)}
.push-when label{display:flex;align-items:center;gap:8px;font-weight:500}.push-when input{width:auto}
.push-days{display:flex;gap:6px;flex-wrap:wrap}
.push-day input{position:absolute;opacity:0;pointer-events:none}
.push-day span{display:inline-flex;align-items:center;justify-content:center;min-width:42px;height:36px;padding:0 10px;border:1px solid var(--line-strong);border-radius:18px;cursor:pointer;font-weight:600;color:var(--muted);background:#fff;user-select:none}
.push-day input:checked+span{background:var(--brand);border-color:var(--brand);color:#fff}
.push-day input:focus-visible+span{outline:2px solid var(--brand);outline-offset:2px}
@media (max-width:640px){.push-since{display:none}.push-device{flex-wrap:wrap}.push-device-btns{width:100%}.push-device-btns .btn{flex:1}}

/* v2.79.0: Einwilligung einholen (Kontakt) */
.consent-opts { display: grid; gap: 8px; }
.consent-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 450; transition: border-color .15s, background .15s; }
.consent-opt input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--brand); flex: none; }
.consent-opt.is-on { border-color: var(--brand); background: var(--soft); }
.consent-open { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: #fff7ed; border: 1px solid #fed7aa; }
.consent-qrbox { display: flex; justify-content: center; padding: 8px; background: #fff; border-radius: 12px; }
.consent-qrbox svg { width: min(260px, 70vw); height: auto; }
.consent-steps { padding-left: 18px; margin: 12px 0; } .consent-steps li { margin: 4px 0; }
.consent-proof { white-space: pre-wrap; max-height: 180px; overflow: auto; }
