/* ───────────────────────────────────────────────────────────────────────────
   Connector → StreamOne Customer Mapping
   Self-contained, fully namespaced (`cmap-`) port of the StreamOne Customers
   mockup (mockup2/connectors.css + conn-render.js). Every selector is scoped
   under `.cmap-page` so it cannot collide with, or be polluted by, the legacy
   `.streamone-*` mapping styles in styles.css. Design tokens are declared
   locally (inheriting the app theme tokens where they exist) so the page never
   depends on whether a given token is defined globally.
   ─────────────────────────────────────────────────────────────────────────── */

.cmap-page {
  /* accent + tint tokens (mockup) */
  --cmap-azure: #0078d4;
  --cmap-azure-light: rgba(0, 120, 212, .10);
  --cmap-azure-mid: rgba(0, 120, 212, .22);
  --cmap-green: var(--green, #16a34a);
  --cmap-green-light: rgba(22, 163, 74, .12);
  --cmap-orange: var(--orange, #d97706);
  --cmap-orange-light: rgba(217, 119, 6, .12);
  --cmap-red: var(--red, #dc2626);
  --cmap-red-light: rgba(220, 38, 38, .12);
  --cmap-purple: #7c3aed;
  --cmap-teal: #0891b2;
  --cmap-slate: #64748b;
  --cmap-slate-light: rgba(100, 116, 139, .14);

  /* surfaces / text inherit the app theme so dark mode flips automatically */
  --cmap-surface: var(--surface, #fff);
  --cmap-surface-2: var(--surface-2, #f8f8f6);
  --cmap-surface-3: var(--surface-3, #eeede8);
  --cmap-border: var(--border, #e4e3dc);
  --cmap-border-strong: #d4d3cc;
  --cmap-text: var(--text, #18181f);
  --cmap-text-dim: var(--text-dim, #52526a);
  --cmap-text-muted: var(--text-muted, #909098);

  --cmap-shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
  --cmap-shadow: 0 2px 8px rgba(0, 0, 0, .10);
  --cmap-shadow-lg: 0 8px 28px rgba(0, 0, 0, .12);

  --cmap-radius: 10px;
  --cmap-ctrl-h: 34px;
  --cmap-card-pad: 16px;
  --cmap-grid-gap: 14px;
  --cmap-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  color: var(--cmap-text);
  font-size: 13px;
  line-height: 1.5;
}

[data-theme="dark"] .cmap-page {
  --cmap-border-strong: rgba(255, 255, 255, .15);
  --cmap-slate-light: rgba(148, 163, 184, .18);
  --cmap-shadow-sm: 0 1px 4px rgba(0, 0, 0, .3);
  --cmap-shadow: 0 3px 12px rgba(0, 0, 0, .4);
  --cmap-shadow-lg: 0 10px 34px rgba(0, 0, 0, .5);
}

.cmap-page *,
.cmap-page *::before,
.cmap-page *::after { box-sizing: border-box; }

/* ─── Back link + page head ─── */
.cmap-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; color: var(--cmap-text-dim);
  background: none; border: 0; padding: 0; cursor: pointer; margin-bottom: 10px;
}
.cmap-back:hover { color: var(--cmap-azure); }

.cmap-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.cmap-title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; color: var(--cmap-text); }
.cmap-sub { font-size: 11.5px; color: var(--cmap-text-muted); margin-top: 4px; max-width: 680px; }
.cmap-controls { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.cmap-field { display: flex; flex-direction: column; gap: 3px; }
.cmap-field > span { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--cmap-text-muted); }
.cmap-field input,
.cmap-field select { height: var(--cmap-ctrl-h); }

.cmap-btn {
  height: var(--cmap-ctrl-h); padding: 0 14px; border-radius: 7px; cursor: pointer;
  font-size: 12px; font-weight: 600; font-family: inherit; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--cmap-surface); color: var(--cmap-text); border: 1px solid var(--cmap-border);
}
.cmap-btn:hover { border-color: var(--cmap-border-strong); }
.cmap-btn.cmap-btn--primary { background: var(--cmap-green); color: #fff; border-color: var(--cmap-green); }
.cmap-btn.cmap-btn--primary:hover { filter: brightness(.94); }
.cmap-btn.cmap-btn--accent { background: var(--cmap-azure); color: #fff; border-color: var(--cmap-azure); }
.cmap-btn.cmap-btn--accent:hover { filter: brightness(.93); }
.cmap-btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ─── Section label ─── */
.cmap-section-label { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--cmap-text-muted); margin: 0 0 10px 2px; display: flex; align-items: center; gap: 8px; }
.cmap-section-label span { color: var(--cmap-text-dim); }

/* ─── Connector summary strip ─── */
.cmap-summary { display: flex; align-items: center; gap: 14px; background: var(--cmap-surface); border: 1px solid var(--cmap-border); border-radius: var(--cmap-radius); box-shadow: var(--cmap-shadow-sm); padding: 14px 16px; margin-bottom: 18px; }
.cmap-summary-logo { width: 42px; height: 42px; flex-shrink: 0; border-radius: 10px; background: var(--cmap-azure-light); color: var(--cmap-azure); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
.cmap-summary-main { flex: 1; min-width: 0; }
.cmap-summary-name { font-size: 15px; font-weight: 700; color: var(--cmap-text); display: flex; align-items: center; gap: 8px; letter-spacing: -.01em; }
.cmap-summary-meta { font-size: 11px; color: var(--cmap-text-muted); font-family: var(--cmap-mono); margin-top: 2px; word-break: break-word; }
.cmap-summary-cov { display: flex; flex-direction: column; gap: 6px; width: 230px; flex-shrink: 0; }
.cmap-summary-cov-head { display: flex; align-items: baseline; justify-content: space-between; }
.cmap-summary-cov-head span { font-size: 10.5px; color: var(--cmap-text-dim); font-weight: 600; }
.cmap-summary-cov-head strong { font-size: 11px; font-weight: 700; color: var(--cmap-text); font-variant-numeric: tabular-nums; }
.cmap-summary-metrics { display: flex; gap: 10px; flex-wrap: wrap; color: var(--cmap-text-muted); font-size: 10.5px; }
.cmap-summary-metrics b { color: var(--cmap-text); font-variant-numeric: tabular-nums; }

/* ─── Mapping-health KPI shell (Ledger KPI strip object renders the cards) ─── */
.cmap-kpi-shell { margin-bottom: 16px; }

/* ─── Segment bar (coverage) ─── */
.cmap-segbar { display: flex; height: 7px; border-radius: 4px; overflow: hidden; gap: 1.5px; background: var(--cmap-surface-3); }
.cmap-segbar span { display: block; height: 100%; }
.cmap-segbar--mini { height: 6px; width: 120px; border-radius: 3px; }

/* ─── Auto-suggest banner ─── */
.cmap-suggest { display: flex; align-items: center; gap: 13px; background: linear-gradient(90deg, var(--cmap-azure-light), transparent 70%); border: 1px solid var(--cmap-azure-mid); border-radius: var(--cmap-radius); padding: 13px 16px; margin-bottom: 16px; }
.cmap-suggest-icon { width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; background: var(--cmap-surface); border: 1px solid var(--cmap-azure-mid); color: var(--cmap-azure); display: flex; align-items: center; justify-content: center; font-size: 17px; }
.cmap-suggest-copy { flex: 1; min-width: 0; }
.cmap-suggest-copy strong { display: block; font-size: 12.5px; font-weight: 700; color: var(--cmap-text); }
.cmap-suggest-copy span { font-size: 11px; color: var(--cmap-text-dim); margin-top: 1px; }
.cmap-suggest-actions { display: flex; gap: 7px; align-items: center; }
.cmap-suggest-x { width: 26px; height: 26px; border: none; background: transparent; color: var(--cmap-text-muted); cursor: pointer; border-radius: 6px; font-size: 15px; line-height: 1; }
.cmap-suggest-x:hover { background: var(--cmap-surface-3); color: var(--cmap-text); }

/* ─── Toolbar ─── */
.cmap-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cmap-filter-groups { display: flex; flex-direction: column; gap: 8px; }
.cmap-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.cmap-tab { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--cmap-surface); border: 1px solid var(--cmap-border); font-size: 11.5px; color: var(--cmap-text-dim); cursor: pointer; font-weight: 500; font-family: inherit; }
.cmap-tab:hover { border-color: var(--cmap-border-strong); }
.cmap-tab.active { background: var(--cmap-text); color: var(--cmap-surface); border-color: var(--cmap-text); font-weight: 600; }
.cmap-tab strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.cmap-tab-dot { width: 7px; height: 7px; border-radius: 50%; }
.cmap-typefilters { display: flex; flex-wrap: wrap; gap: 6px; }
.cmap-typefilter { height: 27px; border: 1px solid var(--cmap-border); border-radius: 6px; background: var(--cmap-surface); color: var(--cmap-text-dim); font: inherit; font-size: 10.5px; font-weight: 600; padding: 0 9px; cursor: pointer; }
.cmap-typefilter.active { color: var(--cmap-azure); border-color: var(--cmap-azure-mid); background: var(--cmap-azure-light); }
.cmap-toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmap-toolbar-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--cmap-text-muted); }
.cmap-search { display: flex; flex-direction: column; gap: 3px; }
.cmap-search input { height: var(--cmap-ctrl-h); min-width: 200px; }
.cmap-sort { display: flex; flex-direction: column; gap: 3px; }
.cmap-viewtoggle { display: flex; border: 1px solid var(--cmap-border); border-radius: 7px; overflow: hidden; height: var(--cmap-ctrl-h); background: var(--cmap-surface); }
.cmap-viewtoggle button { border: none; background: transparent; padding: 0 13px; cursor: pointer; color: var(--cmap-text-muted); display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-family: inherit; font-weight: 600; }
.cmap-viewtoggle button + button { border-left: 1px solid var(--cmap-border); }
.cmap-viewtoggle button.active { background: var(--cmap-azure); color: #fff; }

/* ─── Status badge ─── */
.cmap-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 4px; letter-spacing: .03em; text-transform: uppercase; line-height: 1.6; }
.cmap-badge .cmap-bdot { width: 6px; height: 6px; border-radius: 50%; }
.cmap-badge--mapped { background: var(--cmap-green-light); color: var(--cmap-green); }
.cmap-badge--mapped .cmap-bdot { background: var(--cmap-green); }
.cmap-badge--partial { background: var(--cmap-orange-light); color: var(--cmap-orange); }
.cmap-badge--partial .cmap-bdot { background: var(--cmap-orange); }
.cmap-badge--unmapped { background: var(--cmap-red-light); color: var(--cmap-red); }
.cmap-badge--unmapped .cmap-bdot { background: var(--cmap-red); }
.cmap-badge--unknown { background: var(--cmap-slate-light); color: var(--cmap-slate); }
.cmap-badge--unknown .cmap-bdot { background: var(--cmap-slate); }

/* entitlement type chip */
.cmap-type { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 1px 6px; border-radius: 4px; }
.cmap-type--azure { background: var(--cmap-azure-light); color: var(--cmap-azure); }
.cmap-type--licensing { background: rgba(124, 58, 237, .12); color: var(--cmap-purple); }
.cmap-type--reservation { background: var(--cmap-orange-light); color: var(--cmap-orange); }
.cmap-type--marketplace { background: rgba(8, 145, 178, .14); color: var(--cmap-teal); }
.cmap-type--neutral { background: var(--cmap-slate-light); color: var(--cmap-slate); }

/* ─── Customer card grid ─── */
.cmap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--cmap-grid-gap); }
/* Focused expansion: when one card is open it spans full width and the rest step aside. */
.cmap-card { background: var(--cmap-surface); border: 1px solid var(--cmap-border); border-radius: var(--cmap-radius); box-shadow: var(--cmap-shadow-sm); padding: var(--cmap-card-pad); display: flex; flex-direction: column; gap: 12px; position: relative; transition: box-shadow .14s, border-color .14s; }
.cmap-card:hover { box-shadow: var(--cmap-shadow); border-color: var(--cmap-border-strong); }
.cmap-card.selected { border-color: var(--cmap-azure); box-shadow: 0 0 0 2px var(--cmap-azure-light), var(--cmap-shadow-sm); }

.cmap-card-top { display: flex; align-items: flex-start; gap: 10px; }
.cmap-check { width: 17px; height: 17px; flex-shrink: 0; border: 1.5px solid var(--cmap-border-strong); border-radius: 5px; cursor: pointer; margin-top: 2px; display: flex; align-items: center; justify-content: center; background: var(--cmap-surface); color: transparent; font-size: 11px; line-height: 1; padding: 0; }
.cmap-check:hover { border-color: var(--cmap-azure); }
.cmap-card.selected .cmap-check { background: var(--cmap-azure); border-color: var(--cmap-azure); color: #fff; }

.cmap-trigger { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 10px; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font-family: inherit; }
.cmap-id-wrap { flex: 1; min-width: 0; }
.cmap-name { font-size: 13.5px; font-weight: 700; color: var(--cmap-text); letter-spacing: -.01em; line-height: 1.25; }
.cmap-csub { display: flex; align-items: center; gap: 8px; margin-top: 3px; flex-wrap: wrap; }
.cmap-cid { font-size: 10.5px; color: var(--cmap-text-muted); font-family: var(--cmap-mono); }
.cmap-cid--mapped { color: var(--cmap-green); }
.cmap-chip { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--cmap-azure); background: var(--cmap-azure-light); padding: 2px 6px; border-radius: 4px; }
.cmap-chip--suggested { color: var(--cmap-azure); background: var(--cmap-azure-light); }
.cmap-amount { font-size: 13px; font-weight: 700; color: var(--cmap-text); white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.cmap-amount small { display: block; font-size: 9px; font-weight: 600; color: var(--cmap-text-muted); text-transform: uppercase; letter-spacing: .05em; }
.cmap-caret { width: 22px; height: 22px; flex-shrink: 0; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--cmap-text-muted); transition: transform .2s; }
.cmap-card-head-right { display: flex; align-items: center; gap: 8px; }
.cmap-card-map { color: var(--cmap-text-dim); font-size: 11px; margin-top: 4px; overflow-wrap: anywhere; }
.cmap-reason { font-size: 11.5px; color: var(--cmap-text-dim); min-height: 17px; }
.cmap-counts { display: flex; gap: 6px; flex-wrap: wrap; }
.cmap-counts span { border: 1px solid var(--cmap-border); border-radius: 5px; padding: 4px 6px; font-size: 10.5px; color: var(--cmap-text-muted); background: var(--cmap-surface-2); }
.cmap-counts b { color: var(--cmap-text); margin-left: 3px; }
.cmap-card-actions { display: flex; justify-content: flex-end; }

/* progress / coverage block */
.cmap-prog { display: flex; flex-direction: column; gap: 6px; }
.cmap-prog-head { display: flex; align-items: baseline; justify-content: space-between; }
.cmap-prog-lbl { font-size: 10.5px; color: var(--cmap-text-dim); font-weight: 600; }
.cmap-prog-lbl b { color: var(--cmap-text); }
.cmap-prog-pct { font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--cmap-text-dim); }

/* entitlement preview pills (collapsed card) */
.cmap-pills { display: flex; flex-direction: column; gap: 1px; }
.cmap-pill { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; background: var(--cmap-surface-2); }
.cmap-pill-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cmap-pill-name { flex: 1; min-width: 0; font-size: 11.5px; font-weight: 600; color: var(--cmap-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmap-pill-amt { font-size: 10.5px; color: var(--cmap-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ─── Expanded detail ─── */
.cmap-detail-body { display: flex; flex-direction: column; gap: 14px; padding-top: 14px; border-top: 1px solid var(--cmap-border); }

/* mapping target block */
.cmap-mapblock { background: var(--cmap-surface-2); border: 1px solid var(--cmap-border); border-radius: 9px; padding: 13px 14px; display: flex; flex-direction: column; gap: 11px; }
.cmap-mapblock.is-mapped { background: var(--cmap-green-light); border-color: rgba(22, 163, 74, .25); }
.cmap-mapblock-head { display: flex; align-items: center; gap: 8px; }
.cmap-mapblock-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--cmap-text-muted); }
.cmap-suggest-tag { margin-left: auto; font-size: 10px; font-weight: 700; color: var(--cmap-azure); background: var(--cmap-azure-light); padding: 2px 8px; border-radius: 5px; }
.cmap-current-map { font-size: 12px; color: var(--cmap-text-dim); }
.cmap-current-map b { color: var(--cmap-text); font-weight: 700; }
.cmap-target-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.cmap-target-row .cmap-field { flex: 1; min-width: 220px; }
.cmap-target-row .cmap-field select { width: 100%; }

/* entitlement detail rows */
.cmap-ent-head { display: flex; align-items: baseline; justify-content: space-between; }
.cmap-ent-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--cmap-text-muted); }
.cmap-ent-list { display: flex; flex-direction: column; gap: 10px; }
.cmap-entgroup { border: 1px solid var(--cmap-border); border-radius: 9px; overflow: hidden; }
.cmap-entgroup-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--cmap-surface); border-bottom: 1px solid var(--cmap-border); }
.cmap-entgroup-main { flex: 1; min-width: 0; }
.cmap-entgroup .cmap-ent { border: 0; border-radius: 0; border-top: 1px solid var(--cmap-border); }
.cmap-entgroup .cmap-ent:first-of-type { border-top: 0; }
.cmap-entgroup .cmap-ent-top { background: var(--cmap-surface-2); }
.cmap-ent { border: 1px solid var(--cmap-border); border-radius: 9px; overflow: hidden; }
.cmap-ent-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--cmap-surface); }
.cmap-ent-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cmap-ent-main { flex: 1; min-width: 0; }
.cmap-ent-name { font-size: 12.5px; font-weight: 700; color: var(--cmap-text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cmap-ent-guid { font-size: 10px; color: var(--cmap-text-muted); font-family: var(--cmap-mono); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmap-ent-amt { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--cmap-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmap-ent-body { padding: 0 12px 11px; display: flex; flex-direction: column; gap: 9px; }
.cmap-ent-meta { font-size: 11px; color: var(--cmap-text-dim); }
.cmap-ent-meta b { color: var(--cmap-text); font-weight: 600; }
.cmap-ent-maprow { display: flex; align-items: flex-end; gap: 9px; flex-wrap: wrap; }
.cmap-ent-maprow .cmap-field { flex: 1; min-width: 200px; }
.cmap-ent-maprow .cmap-field select { width: 100%; }
.cmap-ent-note { font-size: 11px; color: var(--cmap-text-muted); background: var(--cmap-surface-2); border: 1px solid var(--cmap-border); border-radius: 8px; padding: 9px 11px; }

/* generic inputs/selects inside the page (mirror app .authi but scoped) */
.cmap-page select.authi,
.cmap-page input.authi,
.cmap-page .cmap-input { height: var(--cmap-ctrl-h); border: 1px solid var(--cmap-border); border-radius: 7px; background: var(--cmap-surface); color: var(--cmap-text); font-size: 12px; font-family: inherit; padding: 0 10px; outline: none; }
.cmap-page select.authi:focus,
.cmap-page input.authi:focus { border-color: var(--cmap-azure); }

/* Reservation associations stay inside the StreamOne mapping workspace. */
.cmap-tabs--workspace { margin: 14px 0 0; }
.cmap-res-list { display: grid; gap: 12px; margin-top: 14px; }
.cmap-res-row { border: 1px solid var(--cmap-border); border-radius: 10px; background: var(--cmap-surface); padding: 14px; min-width: 0; }
.cmap-res-top { display: flex; gap: 12px; justify-content: space-between; align-items: center; }
.cmap-res-top > div { min-width: 0; overflow-wrap: anywhere; }
.cmap-status { display: inline-block; margin-right: 8px; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: capitalize; background: var(--cmap-blue-light); color: var(--cmap-azure); }
.cmap-status--mapped { background: var(--cmap-green-light); color: var(--cmap-green); }
.cmap-status--ambiguous,.cmap-status--conflicting { background: var(--cmap-orange-light); color: var(--cmap-orange); }
.cmap-status--unmatched { background: var(--cmap-red-light); color: var(--cmap-red); }
.cmap-status--auto-mapped { background: var(--cmap-green-light); color: var(--cmap-green); border: 1px solid var(--cmap-green); }
.cmap-status--auto-ready { background: var(--cmap-blue-light); color: var(--cmap-azure); border: 1px solid var(--cmap-azure); }
.cmap-res-sku,.cmap-res-meta,.cmap-res-money,.cmap-res-current { margin-top: 7px; color: var(--cmap-muted); font-size: 12px; overflow-wrap: anywhere; }
.cmap-res-sku { margin-left: 7px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.cmap-res-current { color: var(--cmap-text); }
.cmap-res-review { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.15fr) minmax(280px, 1fr) minmax(200px, .7fr); gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--cmap-border); }
.cmap-res-review section { min-width: 0; padding: 12px; border-radius: 8px; background: var(--cmap-surface-alt, rgba(127,127,127,.06)); font-size: 12px; }
.cmap-res-review h4 { margin: 0 0 9px; font-size: 13px; }
.cmap-res-id { display: grid; gap: 4px; margin-top: 9px; min-width: 0; }
.cmap-res-id span { flex: 0 0 auto; color: var(--cmap-muted); }
.cmap-res-id-value { display: flex; align-items: flex-start; gap: 7px; min-width: 0; flex-wrap: wrap; }
.cmap-res-id code { min-width: 0; font-family: var(--cmap-mono); overflow-wrap: anywhere; word-break: normal; }
.cmap-copy { flex: 0 0 auto; border: 0; background: transparent; color: var(--cmap-azure); cursor: pointer; font-size: 11px; }
.cmap-res-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cmap-res-actions .cmap-btn { max-width: 100%; }
.cmap-detail-rows,.cmap-evidence-rows { display: grid; gap: 7px; }
.cmap-detail-rows > div,.cmap-evidence-rows > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 9px; align-items: baseline; min-width: 0; }
.cmap-detail-rows span,.cmap-evidence-rows span { color: var(--cmap-muted); }
.cmap-detail-rows strong,.cmap-evidence-rows strong { min-width: 0; font-weight: 600; overflow-wrap: normal; }
.cmap-target-preview { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 9px; margin-top: 10px; padding: 9px; border: 1px solid var(--cmap-border); border-radius: 7px; background: var(--cmap-surface-2); color: var(--cmap-text-muted); }
.cmap-target-preview span { color: var(--cmap-muted); }
.cmap-target-preview strong { min-width: 0; overflow-wrap: anywhere; color: var(--cmap-text); }
.cmap-candidates { margin-top: 12px; border-top: 1px solid var(--cmap-border); padding-top: 12px; }
.cmap-candidates h4 { margin: 0 0 8px; font-size: 12px; }
.cmap-candidate { border: 1px solid var(--cmap-border); background: var(--cmap-surface-2); border-radius: 7px; padding: 9px; margin-top: 7px; font-size: 11px; min-width: 0; }

/* Focused customer workspace stays on the existing connector route. */
.cmap-workspace { border: 1px solid var(--cmap-border); border-radius: var(--cmap-radius); background: var(--cmap-surface); padding: 16px; box-shadow: var(--cmap-shadow-sm); }
.cmap-workspace-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 14px; }
.cmap-workspace-head h2 { margin: 0; font-size: 19px; line-height: 1.25; }
.cmap-workspace-head code { font-family: var(--cmap-mono); overflow-wrap: anywhere; }
.cmap-workspace-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 12px 0; border-top: 1px solid var(--cmap-border); }
.cmap-workspace-metrics span { border: 1px solid var(--cmap-border); background: var(--cmap-surface-2); padding: 8px; border-radius: 7px; color: var(--cmap-text-muted); font-size: 10px; }
.cmap-workspace-metrics b { display: block; color: var(--cmap-text); font-size: 16px; margin-top: 2px; }
.cmap-detail-tabs { display: flex; gap: 3px; overflow-x: auto; border-top: 1px solid var(--cmap-border); border-bottom: 1px solid var(--cmap-border); margin: 14px -16px 0; padding: 0 16px; }
.cmap-detail-tab { appearance: none; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--cmap-text-muted); padding: 11px 12px 9px; white-space: nowrap; cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 600; }
.cmap-detail-tab.active { color: var(--cmap-azure); border-bottom-color: var(--cmap-azure); }
.cmap-workspace-body { padding-top: 14px; min-width: 0; }
.cmap-workspace-overview { margin-top: 12px; }
.cmap-workspace-overview p { color: var(--cmap-text-dim); font-size: 12px; }

/* Product-level StreamOne licensing inventory. */
.cmap-license { display: grid; gap: 12px; min-width: 0; }
.cmap-license-sync,.cmap-license-state { display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--cmap-border); border-radius: 8px; background: var(--cmap-surface-2); color: var(--cmap-text-muted); font-size: 11px; }
.cmap-license-sync strong,.cmap-license-state strong { color: var(--cmap-text); }
.cmap-license-state { flex-direction: column; }
.cmap-license-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 8px; }
.cmap-license-summary > div { padding: 10px; border: 1px solid var(--cmap-border); border-radius: 8px; background: var(--cmap-surface); }
.cmap-license-summary span,.cmap-license-summary strong { display: block; }
.cmap-license-summary span { color: var(--cmap-text-muted); font-size: 10px; }
.cmap-license-summary strong { margin-top: 3px; color: var(--cmap-text); font-size: 15px; }
.cmap-license-table-wrap { min-width: 0; overflow-x: auto; border: 1px solid var(--cmap-border); border-radius: 9px; }
.cmap-license-table { width: 100%; min-width: 1180px; border-collapse: collapse; font-size: 11px; }
.cmap-license-table th { padding: 9px 10px; text-align: left; background: var(--cmap-surface-2); border-bottom: 1px solid var(--cmap-border); color: var(--cmap-text-muted); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.cmap-license-table td { min-width: 130px; padding: 10px; vertical-align: top; border-bottom: 1px solid var(--cmap-border); color: var(--cmap-text-dim); }
.cmap-license-table tr:last-child td { border-bottom: 0; }
.cmap-license-table td:first-child { min-width: 210px; }
.cmap-license-table td:last-child { min-width: 220px; }
.cmap-license-table strong,.cmap-license-table small { display: block; overflow-wrap: anywhere; }
.cmap-license-table small { margin-top: 4px; color: var(--cmap-text-muted); }
.cmap-license-table code { font-family: var(--cmap-mono); overflow-wrap: anywhere; }
.cmap-license-table select { width: 100%; margin: 7px 0; }

@media (max-width: 1280px) { .cmap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cmap-res-review { grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.15fr); } .cmap-workspace-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .cmap-res-top { align-items: flex-start; flex-direction: column; } .cmap-res-review { grid-template-columns: minmax(0, 1fr); } .cmap-workspace-head { flex-direction: column; } .cmap-workspace-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cmap-table-wrap { overflow-x: auto; } .cmap-table { min-width: 880px; } }

.cmap-detail-foot { display: flex; align-items: center; gap: 8px; padding-top: 2px; flex-wrap: wrap; }
.cmap-detail-foot .cmap-spacer { flex: 1; }
.cmap-empty { text-align: center; padding: 40px 20px; color: var(--cmap-text-muted); font-size: 13px; background: var(--cmap-surface); border: 1px dashed var(--cmap-border-strong); border-radius: var(--cmap-radius); }

/* ─── Table view ─── */
.cmap-table-wrap { background: var(--cmap-surface); border: 1px solid var(--cmap-border); border-radius: var(--cmap-radius); box-shadow: var(--cmap-shadow-sm); overflow: hidden; }
.cmap-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cmap-table thead th { text-align: left; padding: 11px 14px; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--cmap-text-muted); border-bottom: 1px solid var(--cmap-border); background: var(--cmap-surface-2); white-space: nowrap; }
.cmap-table thead th.tar { text-align: right; }
.cmap-table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--cmap-border); color: var(--cmap-text-dim); vertical-align: middle; }
.cmap-table tbody tr:last-child td { border-bottom: none; }
.cmap-table tbody tr.cmap-trow { cursor: pointer; }
.cmap-table tbody tr.cmap-trow:hover td { background: var(--cmap-surface-2); }
.cmap-table tbody tr.selected td { background: var(--cmap-azure-light); }
.cmap-td-name { font-weight: 700; color: var(--cmap-text); }
.cmap-td-id { font-family: var(--cmap-mono); font-size: 10.5px; color: var(--cmap-text-muted); margin-top: 1px; }
.cmap-td-amount { text-align: right; font-weight: 700; color: var(--cmap-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmap-table-trigger { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font-family: inherit; color: inherit; }
.cmap-table-cov { display: flex; flex-direction: column; gap: 4px; }
.cmap-table-cov span { font-size: 10.5px; color: var(--cmap-text-muted); font-variant-numeric: tabular-nums; }
.cmap-ent-mini-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.cmap-ent-mini { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: var(--cmap-surface-2); border: 1px solid var(--cmap-border); color: var(--cmap-text-dim); }
.cmap-ent-mini .cmap-pill-dot { width: 6px; height: 6px; }
.cmap-table-detail td { background: var(--cmap-surface-2); padding: 14px; }
.cmap-table-link { font-size: 11.5px; font-weight: 600; color: var(--cmap-azure); }

/* ─── Bulk action bar ─── */
.cmap-bulkbar { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(160%); background: var(--cmap-text); color: var(--cmap-surface); border-radius: 12px; box-shadow: var(--cmap-shadow-lg); padding: 11px 14px 11px 18px; display: flex; align-items: center; gap: 14px; z-index: 300; transition: transform .22s cubic-bezier(.3, 1.2, .5, 1); }
.cmap-bulkbar.show { transform: translateX(-50%) translateY(0); }
.cmap-bulk-count { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.cmap-bulk-count span { background: var(--cmap-azure); color: #fff; border-radius: 6px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.cmap-bulk-actions { display: flex; gap: 7px; }
.cmap-bulk-actions .cmap-btn { height: 32px; }

/* ─── Diagnostics (pricing source-path) panel ─── */
.cmap-diag { margin-top: 12px; border: 1px solid var(--cmap-border); border-radius: 9px; background: var(--cmap-surface); overflow: hidden; }
.cmap-diag-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--cmap-surface-2); border-bottom: 1px solid var(--cmap-border); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--cmap-text-muted); }
.cmap-diag-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.cmap-diag-table th { text-align: left; padding: 7px 10px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--cmap-text-muted); border-bottom: 1px solid var(--cmap-border); }
.cmap-diag-table td { padding: 7px 10px; border-bottom: 1px solid var(--cmap-border); color: var(--cmap-text-dim); vertical-align: top; }
.cmap-diag-table td code { font-family: var(--cmap-mono); font-size: 10px; color: var(--cmap-text); word-break: break-all; }
.cmap-diag-ok { color: var(--cmap-green); font-weight: 700; }
.cmap-diag-missing { color: var(--cmap-red); font-weight: 700; }
.cmap-diag-parent { color: var(--cmap-orange); font-weight: 700; }

/* ─── Responsive ─── */
@media (max-width: 760px) {
  .cmap-grid { grid-template-columns: 1fr; }
  .cmap-toolbar-right { width: 100%; }
  .cmap-summary-cov { display: none; }
  /* Let the summary strip wrap so its meta line keeps real width instead of collapsing
     into a one-word-per-line column next to the status metrics. */
  .cmap-summary { flex-wrap: wrap; }
  .cmap-summary-metrics { flex-basis: 100%; margin-top: 4px; }
}
