/* enrich.css - kompakte Enrichment-UI mit Richtungsschalter (<- x ->), Import optional, CRM read-only */

.en-card { width: min(1360px, 98vw); max-height: 92vh; overflow: auto; border-radius: 16px; }
.en-head { display:grid; grid-template-columns: 1fr auto; align-items:center; gap:12px; padding:10px 14px; border-bottom:1px solid var(--border); }
.en-title { font-size:1.06rem; font-weight:600; }
.en-nav { display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.en-body { padding:10px 14px; }
.en-foot { display:flex; justify-content:flex-end; gap:12px; padding:10px 14px; border-top:1px solid var(--border); }

.en-sections { display:flex; flex-direction:column; gap:24px; }
.en-section { display:flex; flex-direction:column; gap:12px; }
.en-section-head { display:flex; align-items:center; justify-content:space-between; }
.en-section-head h3 { margin:0; font-size:1rem; font-weight:600; }
.en-section-body { display:flex; flex-direction:column; gap:12px; }
.en-section-body .cm-meta { margin:4px 0; }

.table-wrap { overflow:auto; max-height:64vh; }

.en-table .col-imp        { width: 36%; }
.en-table .col-switch     { width: 10%; text-align:center; }
.en-table .col-crm        { width: 36%; }
.en-table .col-importkey  { width: 10%; }
.en-table .col-target     { width: 18%; }

.en-table td, .en-table th { vertical-align: middle; padding: 6px 8px; line-height: 1.25; }

.en-input { width:100%; padding:6px 8px; border:1px solid var(--border); border-radius:8px; background:var(--bg); font: inherit; }
.en-ro { white-space: normal; word-break: break-word; }

.en-field-wrap { display:flex; align-items:center; gap:8px; }
select.en-target, #en-add-key {
  -webkit-appearance: none; appearance: none;
  padding:6px 10px; border:1px solid var(--border); background:var(--bg);
  border-radius: 8px;
  font: inherit;
}
.en-target-label {
  padding: 3px 8px; border: 1px dashed var(--border); border-radius: 6px;
  background: var(--bg-muted, #1f29371a); font-size: .92em;
}

.dir-switch { display:inline-flex; border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.dir-switch .dir {
  appearance:none; border:0; padding:6px 10px; min-width:32px; cursor:pointer; background:transparent; font-weight:600; line-height:1;
}
.dir-switch .dir.active { background: var(--accent, #2563eb); color:#fff; }
.dir-switch .dir.del { border-left:1px solid var(--border); border-right:1px solid var(--border); }

.en-meta-row td { padding:4px 8px; font-size:.85rem; color: var(--muted,#6b7280); background:var(--bg-muted,#1f29371a); border-top:1px solid var(--border); }
.en-meta-row .meta-crm,
.en-meta-row .meta-import { display:inline-block; }
.en-meta-row .meta-crm { font-weight:600; margin-right:12px; }
.en-meta-row code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size:.82rem; }

.syscode { display:inline-block; padding:2px 6px; border-radius:6px; background:var(--bg-muted,#1f29371a); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }

.btn-icon { border:0; background:transparent; cursor:pointer; width:28px; height:28px; line-height:28px; text-align:center; }
.btn { padding:6px 12px; border-radius:10px; border:1px solid var(--border); background:var(--bg-card); cursor:pointer; }
.btn-primary { background:var(--accent,#2563eb); color:#fff; border-color: transparent; }
.btn-ghost { background:transparent; border:0; }

.en-toggle { position:relative; display:inline-flex; align-items:center; gap:8px; padding:4px 8px; border:1px solid var(--border); border-radius:999px; background:var(--bg-card); cursor:pointer; font-size:.85rem; }
.en-toggle input { position:absolute; opacity:0; width:0; height:0; }
.en-toggle-pill { position:relative; width:34px; height:18px; border-radius:999px; background:var(--border); transition:background .2s ease; flex-shrink:0; }
.en-toggle-pill::after { content:""; position:absolute; top:2px; left:2px; width:14px; height:14px; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.2); transition:transform .2s ease; }
.en-toggle input:checked + .en-toggle-pill { background:var(--accent,#2563eb); }
.en-toggle input:checked + .en-toggle-pill::after { transform:translateX(14px); }
.en-toggle-text { white-space:nowrap; font-size:.82rem; font-weight:500; }

.muted { color: var(--muted,#6b7280); }

/* Filter-Editor */
.en-filter .en-body { padding: 0; }
.en-filter-table td, .en-filter-table th { padding: 8px 10px; }
.cm-meta { color: var(--muted,#6b7280); font-size: .9em; margin-top:2px; }
