/* Phase 12 — Connections Control Center. Jetons de styles.css uniquement. */

.cx-kpis { margin-bottom: 14px; }

.cx-panel,
.cx-toolbar,
.cx-service-card,
.cx-account,
.cx-detail-hero,
.cx-ai-bridge { min-height: 0; }

.cx-panel { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.cx-panel > header,
.cx-account-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cx-panel > header h3 { margin: 2px 0 0; font-size: 15px; }
.cx-panel > header p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }

.cx-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cx-overview-grid .cx-panel { margin-bottom: 0; }
.cx-overview-grid .is-wide { grid-column: 1 / -1; }

/* Bande d'état du Vault */
.cx-vault-band { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cx-vault-band > svg { width: 20px; height: 20px; flex: none; }
.cx-vault-band > div { flex: 1; min-width: 0; }
.cx-vault-band strong { font-size: 13.5px; }
.cx-vault-band p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.cx-vault-band.is-unlocked { border-color: var(--green-soft); }
.cx-vault-band.is-unlocked > svg { color: var(--green); }
.cx-vault-band.is-locked > svg { color: var(--yellow); }

/* Listes et lignes */
.cx-list { display: flex; flex-direction: column; }
.cx-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 9px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cx-row:last-child { border-bottom: 0; }
.cx-row:hover:not(.is-static) { background: var(--surface-soft); }
.cx-row.is-static { cursor: default; }
.cx-row > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.cx-row strong { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.cx-row small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.cx-row-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--surface-soft); color: var(--brand-blue-dark); }
.cx-row-icon svg { width: 15px; height: 15px; }
.cx-row-icon.is-warn { background: var(--yellow-soft); color: var(--yellow); }
.cx-row-icon.is-bad { background: var(--red-soft); color: var(--red); }
.cx-row-icon.is-muted { color: var(--muted); }

/* Pastilles */
.cx-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--surface-soft); color: var(--muted); }
.cx-pill.is-ok { background: var(--green-soft); color: var(--green); }
.cx-pill.is-warn { background: var(--yellow-soft); color: var(--yellow); }
.cx-pill.is-bad { background: var(--red-soft); color: var(--red); }
.cx-pill.is-pending { background: var(--blue-soft); color: var(--brand-blue-dark); }

.cx-chips { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px; min-width: 0; }
.cx-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; font-size: 11.5px; font-style: normal; color: var(--text); background: var(--surface); white-space: nowrap; }
.cx-chip.is-ok { border-color: var(--green-soft); background: var(--green-soft); color: var(--green); }
.cx-chip.is-warn { border-color: var(--yellow-soft); background: var(--yellow-soft); color: var(--yellow); }
.cx-chip.is-bad { border-color: var(--red-soft); background: var(--red-soft); color: var(--red); }
.cx-chip.is-pending { border-style: dashed; color: var(--muted); }
.cx-chip.is-assisted { border-color: var(--cyan-soft); background: var(--cyan-soft); color: var(--cyan); }
.cx-chip.is-off { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.cx-chip.is-muted { color: var(--muted); }
.cx-chip button { padding: 0 0 0 2px; border: 0; background: none; color: inherit; font-size: 13px; line-height: 1; cursor: pointer; }

/* Vue d'ensemble : catégories */
.cx-category-line { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.cx-category-line:last-child { border-bottom: 0; }
.cx-category-line > span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.cx-category-line > span svg { width: 15px; height: 15px; }
.cx-category-line > div { display: flex; flex-wrap: wrap; gap: 6px; }
.cx-service-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: inherit; font: inherit; font-size: 12.5px; cursor: pointer; }
.cx-service-chip:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.cx-service-chip small { color: var(--muted); }

.cx-logo.service-logo { width: 30px; height: 30px; min-width: 30px; border-radius: 8px; }
.cx-service-chip .cx-logo.service-logo { width: 22px; height: 22px; min-width: 22px; border-radius: 999px; }

/* Barre d'outils */
.cx-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 12px; }
.cx-toolbar-end { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.cx-toolbar select { height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font: inherit; font-size: 12.5px; }
.cx-filter-chips button { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.cx-filter-chips button.active { border-color: var(--brand-blue); background: var(--blue-soft); color: var(--brand-blue-dark); font-weight: 600; }
.cx-toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* Services */
.cx-category { margin-bottom: 18px; }
.cx-category > h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; }
.cx-category > h3 svg { width: 16px; height: 16px; color: var(--brand-blue); }
.cx-category > h3 span { padding: 1px 7px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: 11.5px; }
.cx-service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cx-service-card { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 14px; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color 0.15s ease, transform 0.15s ease; }
.cx-service-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.cx-service-card > header { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.cx-service-card > header div { display: flex; flex-direction: column; min-width: 0; }
.cx-service-card strong { font-size: 14px; }
.cx-service-card small { color: var(--muted); font-size: 12px; }
.cx-service-card p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.cx-service-card footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; font-size: 12px; color: var(--muted); }
.cx-service-card footer > span { display: inline-flex; align-items: center; gap: 5px; }
.cx-service-card footer svg { width: 13px; height: 13px; }
.cx-capability-mini b { font-weight: 700; }
.cx-capability-mini b.is-ok { color: var(--green); }
.cx-capability-mini b.is-assisted { color: var(--cyan); }
.cx-capability-mini b.is-off { color: var(--muted); }
.cx-ai-hint { color: var(--brand-blue-dark); }

/* Fiche service */
.cx-detail-hero { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; padding: 16px 18px; }
.cx-detail-hero > .text-button { align-self: flex-start; }
.cx-detail-identity { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.cx-detail-identity .cx-logo.service-logo { width: 44px; height: 44px; min-width: 44px; border-radius: 11px; }
.cx-detail-identity h2 { margin: 2px 0 0; font-size: 21px; }
.cx-detail-identity p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.cx-detail-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.cx-detail-facts > span { display: inline-flex; align-items: center; gap: 6px; }
.cx-detail-facts svg { width: 14px; height: 14px; }
.cx-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }

.cx-ai-bridge { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-bottom: 14px; padding: 14px 16px; border-color: var(--blue-soft); background: linear-gradient(0deg, var(--surface), var(--surface)), var(--blue-soft); }
.cx-ai-bridge > span { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--blue-soft); color: var(--brand-blue-dark); }
.cx-ai-bridge p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }

.cx-account { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; padding: 16px 18px; }
.cx-account.is-revoked { opacity: 0.72; }
.cx-account.is-focused { border-color: var(--brand-blue); }
.cx-account-head > div:first-child { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cx-account-head strong { font-size: 15px; }
.cx-account-head strong span { color: var(--brand-blue-dark); font-weight: 600; }
.cx-account-head small { color: var(--muted); font-size: 12px; }
.cx-account-tools { display: flex; gap: 4px; }
.cx-account h4 { margin: 0 0 8px; color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.cx-account-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; }

.cx-methods { display: flex; flex-direction: column; gap: 6px; }
.cx-method { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; grid-template-areas: "kind body side" "kind actions actions"; align-items: center; gap: 4px 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.cx-method-kind { grid-area: kind; align-self: start; padding: 3px 7px; border-radius: 6px; background: var(--surface-soft); color: var(--brand-blue-dark); font-size: 11.5px; font-weight: 700; text-align: center; }
.cx-method > div { grid-area: body; display: flex; flex-direction: column; min-width: 0; }
.cx-method strong { font-size: 13px; overflow-wrap: anywhere; }
.cx-method small { color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
.cx-method-side { grid-area: side; display: flex; align-items: center; gap: 6px; }
.cx-method-actions { grid-area: actions; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.cx-method-actions:empty { display: none; }
.cx-agent { color: var(--muted); font-size: 11px; font-style: normal; white-space: nowrap; }
.cx-agent.is-on { color: var(--green); }
.cx-error { color: var(--red); font-size: 11.5px; font-style: normal; }
.cx-add-methods { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.cx-capabilities { display: flex; flex-direction: column; }
.cx-capability { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.cx-capability:last-child { border-bottom: 0; }
.cx-action-bar { display: flex; flex-wrap: wrap; gap: 6px; }

.cx-resources,
.cx-policies { padding-top: 12px; border-top: 1px solid var(--line); }
.cx-resource { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 4px 10px; padding: 8px 0; }
.cx-resource > span:first-child { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--surface-soft); color: var(--brand-blue-dark); }
.cx-resource > span:first-child svg { width: 15px; height: 15px; }
.cx-resource > div { display: flex; flex-direction: column; min-width: 0; }
.cx-resource strong { font-size: 13px; }
.cx-resource small { color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
.cx-resource-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 5px; }
.cx-policies .cx-chips { margin-bottom: 6px; }

.is-danger-soft { color: var(--red) !important; }

.cx-runbook { display: flex; flex-direction: column; gap: 6px; }
.cx-runbook ol { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.7; }
.cx-runbook p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }

.cx-note { display: flex; align-items: flex-start; gap: 7px; margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.cx-note svg { flex: none; width: 14px; height: 14px; margin-top: 1px; }
.cx-note code { font-size: 11.5px; }
.cx-note, .cx-runbook, .cx-runbook li, .cx-runbook p { min-width: 0; overflow-wrap: anywhere; }
.cx-muted { margin: 0; color: var(--muted); font-size: 12.5px; }
.cx-warning { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius); background: var(--yellow-soft); color: var(--yellow); font-size: 12.5px; }

/* Tables Comptes / Ressources */
.cx-table { display: flex; flex-direction: column; }
.cx-table-row { display: grid; grid-template-columns: minmax(220px, 1.4fr) minmax(0, 1.4fr) 110px 110px auto; align-items: center; gap: 12px; width: 100%; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cx-table-row:last-child { border-bottom: 0; }
.cx-table-row:hover:not(.is-static) { background: var(--surface-soft); }
.cx-table-row.is-static { cursor: default; }
.cx-table-service { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cx-table-service > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.cx-table-service strong { font-size: 13px; overflow-wrap: anywhere; }
.cx-table-service small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.cx-table-meta { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }

/* Vault */
.cx-tabs { margin-bottom: 14px; }
.cx-logins { display: flex; flex-direction: column; }
.cx-login { display: grid; grid-template-columns: minmax(200px, 1.2fr) minmax(170px, 1fr) minmax(190px, 1fr) minmax(130px, 0.8fr) auto auto; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.cx-login:last-child { border-bottom: 0; }
.cx-login-service { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cx-login-service > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.cx-login-service strong { font-size: 13px; overflow-wrap: anywhere; }
.cx-login-service small,
.cx-login-field small,
.cx-login-meta small { color: var(--muted); font-size: 11.5px; }
.cx-login-field { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-rows: auto auto; align-items: center; column-gap: 4px; min-width: 0; }
.cx-login-field small { grid-column: 1 / -1; }
.cx-login-field b { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.cx-secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.06em; }
.cx-secret.is-revealed { letter-spacing: 0; color: var(--brand-blue-dark); }
.cx-login-meta { display: flex; flex-direction: column; min-width: 0; font-size: 12.5px; }
.cx-login-meta a { color: var(--brand-blue-dark); overflow-wrap: anywhere; }
.cx-login-actions { display: flex; gap: 4px; }

.cx-password-field { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cx-password-field input { flex: 1; min-width: 160px; }
.cx-hostkey { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.cx-hostkey code { overflow-wrap: anywhere; }

/* Tiroir credential et résultat d'action */
.cx-drawer { display: flex; flex-direction: column; gap: 10px; }
.cx-drawer h4 { margin: 8px 0 0; color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.cx-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 0; }
.cx-facts div { display: flex; flex-direction: column; min-width: 0; }
.cx-facts dt { color: var(--muted); font-size: 11.5px; }
.cx-facts dd { margin: 1px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.cx-drawer-value { margin: 0; padding: 10px; border-radius: var(--radius); background: var(--surface-soft); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; overflow-wrap: anywhere; }
.cx-action-outcome { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.cx-action-outcome p { margin: 0; font-size: 12.5px; }
.cx-action-outcome small { color: var(--muted); font-size: 11.5px; }
.cx-action-outcome pre { max-height: 220px; margin: 4px 0 0; padding: 8px; overflow: auto; border-radius: 6px; background: var(--surface-soft); font-size: 11.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cx-action-outcome.is-completed { border-color: var(--green-soft); }
.cx-action-outcome.is-denied,
.cx-action-outcome.is-failed { border-color: var(--red-soft); }
.cx-action-outcome.is-awaiting_approval { border-color: var(--yellow-soft); }

@media (max-width: 1180px) {
  .cx-account-grid { grid-template-columns: minmax(0, 1fr); }
  .cx-login { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cx-login-meta, .cx-login .cx-chips { grid-column: auto; }
  .cx-table-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .cx-table-row .cx-table-meta { display: none; }
}

@media (max-width: 760px) {
  .cx-vault-band { flex-wrap: wrap; }
  .cx-vault-band > button { width: 100%; justify-content: center; }
  .cx-overview-grid { grid-template-columns: minmax(0, 1fr); }
  .cx-category-line { grid-template-columns: minmax(0, 1fr); }
  .cx-detail-identity { grid-template-columns: 44px minmax(0, 1fr); }
  .cx-detail-identity > .cx-pill { grid-column: 2; justify-self: start; }
  .cx-detail-actions { margin-left: 0; width: 100%; }
  .cx-ai-bridge { grid-template-columns: 38px minmax(0, 1fr); }
  .cx-ai-bridge > button { grid-column: 1 / -1; }
  .cx-toolbar .stack-search { width: 100%; }
  .cx-toolbar-end { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .cx-method { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kind side" "body body" "actions actions"; }
  .cx-method-kind { justify-self: start; }
  .cx-login { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .cx-table-row { grid-template-columns: minmax(0, 1fr) auto; }
  .cx-table-row > .cx-chips { grid-column: 1 / -1; grid-row: 2; }
  .cx-facts { grid-template-columns: minmax(0, 1fr); }
  .cx-service-grid { grid-template-columns: minmax(0, 1fr); }
}

/* =====================================================================
   Micro-passe maquettes (Services · fiche service · Vault + drawer)
   ===================================================================== */

:root {
  /* Alias locaux vers les jetons SYD (styles.css) : aucune palette propre à Connections. */
  --cx-border: var(--line);
  --cx-radius: 12px;
  --cx-shadow: 0 1px 2px rgba(13, 71, 161, 0.04), 0 4px 14px rgba(13, 71, 161, 0.04);
  --cx-blue: var(--brand-blue);
  --cx-blue-soft: var(--blue-soft);
  --cx-green: var(--green);
  --cx-green-soft: var(--green-soft);
  --cx-orange: var(--yellow);
  --cx-orange-soft: var(--yellow-soft);
  --cx-red: var(--red);
  --cx-red-soft: var(--red-soft);
  --cx-slate: var(--muted);
  --cx-slate-soft: var(--surface-soft);
}

.cx-card { background: var(--surface); border: 1px solid var(--cx-border); border-radius: var(--cx-radius); box-shadow: var(--cx-shadow); }
.cx-kicker { display: block; color: var(--muted); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; }
.cx-muted { color: var(--muted); font-size: 12.5px; }

/* Boutons */
/* Alignés sur les boutons standard (styles.css) : mêmes hauteurs, rayon, police — seule la classe reste locale. */
.cx-primary-button, .cx-outline-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 13px; border-radius: 6px; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background 0.15s ease, border-color 0.15s ease; }
.cx-primary-button { border: 1px solid var(--brand-blue); background: var(--brand-gradient); color: #fff; }
.cx-primary-button:hover { filter: brightness(1.04); }
.cx-outline-button { min-height: 34px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.cx-outline-button:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.cx-outline-button.is-neutral { color: var(--text); }
.cx-outline-button.is-danger { border-color: #f3c7c3; color: var(--cx-red); }
.cx-outline-button.is-danger:hover { background: var(--cx-red-soft); }
.cx-primary-button.is-small, .cx-outline-button.is-small { min-height: 30px; padding: 0 11px; font-size: 11px; }
.cx-primary-button svg, .cx-outline-button svg { width: 15px; height: 15px; }
.cx-outline-button[disabled], .cx-primary-button[disabled] { opacity: 0.5; cursor: not-allowed; }
.cx-icon-button { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--cx-border); border-radius: 8px; background: var(--surface); color: var(--cx-slate); cursor: pointer; flex: none; }
.cx-icon-button:hover { background: #f5f8fc; color: var(--text); }
.cx-icon-button svg { width: 15px; height: 15px; }
.cx-icon-button.is-static { border-color: transparent; background: none; cursor: inherit; }
.cx-icon-spacer { display: inline-block; width: 32px; height: 32px; flex: none; }
/* Même lien compact que `.text-button`. */
.cx-link { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border: 0; border-radius: 6px; background: none; color: var(--blue); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.cx-link:hover { background: var(--blue-soft); }
.cx-link svg { width: 14px; height: 14px; }
.cx-help { display: inline-grid; place-items: center; color: #8a9ab2; cursor: help; vertical-align: middle; }
.cx-help svg { width: 14px; height: 14px; }

/* ServiceLogo */
.cx-slogo { display: inline-grid; place-items: center; flex: none; overflow: hidden; border: 1px solid var(--cx-border); border-radius: 10px; background: #fff; }
.cx-slogo img { width: 66%; height: 66%; object-fit: contain; object-position: center; display: block; }
.cx-slogo b { color: var(--service-color, var(--cx-blue)); font-size: 12px; font-weight: 800; letter-spacing: 0.02em; }
.cx-slogo.is-xs { width: 20px; height: 20px; border-radius: 6px; }
.cx-slogo.is-xs img { width: 72%; height: 72%; }
.cx-slogo.is-xs b { font-size: 8px; }
.cx-slogo.is-sm { width: 28px; height: 28px; border-radius: 8px; }
.cx-slogo.is-md { width: 42px; height: 42px; }
.cx-slogo.is-lg { width: 52px; height: 52px; border-radius: 12px; }
.cx-slogo.is-xl { width: 76px; height: 76px; border-radius: 18px; }
.cx-slogo.is-xl img { width: 70%; height: 70%; }
.cx-slogo.is-xl b { font-size: 20px; }

/* StatusBadge et étiquettes */
.cx-badge { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--cx-slate-soft); color: var(--cx-slate); }
.cx-badge.is-ok { background: var(--cx-green-soft); color: var(--cx-green); }
.cx-badge.is-info { background: var(--cx-blue-soft); color: #3d5a86; }
.cx-badge.is-warn { background: var(--cx-orange-soft); color: var(--cx-orange); }
.cx-badge.is-bad { background: var(--cx-red-soft); color: var(--cx-red); }
.cx-tag { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border: 1px solid var(--cx-border); border-radius: 6px; background: #fff; color: var(--cx-slate); font-size: 11.5px; font-style: normal; font-weight: 500; white-space: nowrap; }
.cx-tag.is-soft { border-color: transparent; background: var(--cx-blue-soft); color: #2b5ea6; }
.cx-tag.is-warn { border-color: transparent; background: var(--cx-orange-soft); color: var(--cx-orange); }
.cx-tag.is-bad { border-color: transparent; background: var(--cx-red-soft); color: var(--cx-red); }
.cx-guard { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 6px; background: #fdf3d6; color: #8a6200; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10.5px; font-style: normal; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
.cx-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--cx-slate-soft); color: var(--cx-slate); font-size: 11.5px; font-weight: 700; }

/* FavoriteToggle */
.cx-fav { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: none; color: #9aa9bf; cursor: pointer; flex: none; }
.cx-fav svg { width: 17px; height: 17px; }
.cx-fav:hover { background: #f3f6fb; color: var(--cx-blue); }
.cx-fav.is-on { color: var(--cx-blue); }
.cx-fav.is-on svg { fill: currentColor; }

/* Menu « … » */
.cx-menu-wrap { position: relative; display: inline-flex; }
.cx-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; display: flex; flex-direction: column; min-width: 210px; padding: 6px; border: 1px solid var(--cx-border); border-radius: 10px; background: #fff; box-shadow: 0 12px 30px rgba(15, 40, 80, 0.14); }
.cx-menu[hidden] { display: none; }
.cx-menu.is-wide { min-width: 260px; gap: 4px; }
.cx-menu > button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; border-radius: 7px; background: none; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.cx-menu > button:hover { background: #f3f7fd; }
.cx-menu > button.is-danger { color: var(--cx-red); }
.cx-menu > button svg { width: 15px; height: 15px; }
.cx-menu.is-wide > button { justify-content: flex-start; height: auto; }

/* En-tête de page */
.cx-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: 4px 0 18px; }
.cx-page-head h1 { margin: 6px 0 6px; font-size: 26px; line-height: 1.15; letter-spacing: -0.01em; }
.cx-page-head p { max-width: 720px; margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.cx-page-head.is-compact { margin-bottom: 14px; }
.cx-page-head.is-compact h1 { font-size: 24px; margin-top: 4px; }
.cx-head-actions { display: flex; flex-wrap: wrap; gap: 10px; flex: none; }

/* A · Favoris */
.cx-favorites { padding: 16px 18px 18px; margin-bottom: 14px; }
.cx-favorites > header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cx-favorites > header > div { flex: 1; display: flex; flex-direction: column; }
.cx-favorites > header strong { font-size: 15px; }
.cx-favorites > header small { color: var(--muted); font-size: 12.5px; }
.cx-fav-mark { display: inline-grid; place-items: center; color: var(--yellow); }
.cx-fav-mark svg { width: 20px; height: 20px; fill: currentColor; }
.cx-fav-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(214px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.cx-fav-card { position: relative; display: flex; align-items: center; padding: 10px 8px 10px 12px; border: 1px solid var(--cx-border); border-radius: 10px; background: #fff; }
.cx-fav-card:hover { border-color: #c9d8ec; }
.cx-fav-open { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 0; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.cx-fav-open > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cx-fav-open strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-fav-open small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.cx-fav-open .cx-badge { height: 19px; font-size: 11px; }
.cx-fav-card .cx-fav { align-self: flex-start; }
.cx-fav-manage { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--cx-border); }
.cx-chip-button { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px 0 6px; border: 1px solid var(--cx-border); border-radius: 999px; background: #fff; font: inherit; font-size: 12.5px; cursor: pointer; }
.cx-chip-button svg { width: 13px; height: 13px; color: var(--cx-blue); }

/* A · Recherche + catégories */
.cx-filterbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; padding: 12px 14px; }
.cx-filterbar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cx-filterbar-end { display: flex; align-items: center; gap: 14px; }
.cx-search { display: flex; align-items: center; gap: 8px; width: min(100%, 340px); height: 38px; padding: 0 12px; border: 1px solid var(--cx-border); border-radius: 8px; background: #fff; }
.cx-search svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.cx-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: inherit; font-size: 13px; }
.cx-filterbar select, .cx-select { height: 38px; padding: 0 10px; border: 1px solid var(--cx-border); border-radius: 8px; background: #fff; font: inherit; font-size: 13px; color: var(--text); }
.cx-check { display: inline-flex; align-items: center; gap: 8px; color: var(--cx-slate); font-size: 13px; white-space: nowrap; }
.cx-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-pills > button { height: 32px; padding: 0 14px; border: 1px solid var(--cx-border); border-radius: 999px; background: #fff; color: var(--cx-slate); font: inherit; font-size: 13px; cursor: pointer; }
.cx-pills > button:hover { border-color: #c9d8ec; }
.cx-pills > button.is-active { border-color: var(--line-strong); background: var(--cx-blue-soft); color: var(--brand-blue-dark); font-weight: 600; }
.cx-pills.is-static { gap: 6px; }

/* A · Sections et cartes service */
.cx-section { margin-bottom: 24px; }
.cx-section > header, .cx-vcat > header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cx-section > header h2, .cx-vcat > header h2 { margin: 0; font-size: 16px; }
.cx-section > header .cx-link { margin-left: auto; }
.cx-section-icon { display: inline-grid; place-items: center; color: var(--cx-blue); }
.cx-section-icon svg { width: 18px; height: 18px; }
.cx-sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.cx-scard { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--cx-border); border-radius: var(--cx-radius); background: #fff; box-shadow: var(--cx-shadow); }
.cx-scard > header { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.cx-scard > header > div { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.cx-scard strong { font-size: 15px; line-height: 1.2; }
.cx-scard p { flex: 1; margin: 0; color: #34445c; font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cx-scard-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--cx-slate); font-size: 12.5px; }
.cx-scard-meta span { display: inline-flex; align-items: center; gap: 6px; }
.cx-scard-meta svg { width: 14px; height: 14px; }
.cx-scard > footer { display: flex; gap: 8px; }
.cx-scard > footer > .cx-outline-button { flex: 1; }

/* B · En-tête de fiche */
.cx-detail-head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 24px; align-items: center; margin-bottom: 0; padding: 22px 24px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.cx-back { position: absolute; top: 10px; left: 14px; display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.cx-back svg { width: 13px; height: 13px; }
.cx-back:hover { color: var(--cx-blue); }
.cx-detail-main { display: flex; align-items: center; gap: 20px; min-width: 0; padding-top: 8px; }
.cx-detail-main h1 { margin: 4px 0 4px; font-size: 28px; line-height: 1.1; }
.cx-detail-main p { margin: 0; color: #34445c; font-size: 13.5px; }
.cx-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 12px; color: var(--cx-slate); font-size: 13px; }
.cx-detail-meta span { display: inline-flex; align-items: center; gap: 6px; }
.cx-detail-meta svg { width: 15px; height: 15px; }
.cx-account-summary { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--cx-border); border-radius: 12px; background: #fbfcfe; }
.cx-account-summary.is-empty { display: flex; justify-content: space-between; }
.cx-account-summary > div:not(.cx-account-summary-tools) { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cx-account-summary strong { font-size: 14.5px; overflow-wrap: anywhere; }
.cx-account-summary small { color: var(--muted); font-size: 12px; }
.cx-avatar { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: color-mix(in srgb, var(--service-color, var(--brand-blue)) 14%, #fff); color: var(--service-color, var(--brand-blue)); font-size: 20px; font-weight: 800; }
.cx-account-stats { display: flex; gap: 18px; margin-top: 8px; color: var(--muted); font-size: 11.5px; }
.cx-account-stats > span { display: flex; flex-direction: column; white-space: nowrap; }
.cx-account-stats b { color: var(--text); font-size: 15px; line-height: 1.2; }
.cx-account-summary-tools { display: flex; align-items: center; gap: 6px; align-self: start; }
.cx-account-summary-tools select { height: 30px; max-width: 150px; padding: 0 6px; border: 1px solid var(--cx-border); border-radius: 7px; font: inherit; font-size: 12px; }

/* B · Onglets */
.cx-tabsbar { display: flex; gap: 6px; margin: 0 0 18px; padding: 0 16px; overflow-x: auto; border: 1px solid var(--cx-border); border-top: 0; border-radius: 0 0 var(--cx-radius) var(--cx-radius); background: #fff; box-shadow: var(--cx-shadow); }
.cx-tabsbar > button { position: relative; flex: none; height: 46px; padding: 0 12px; border: 0; background: none; color: var(--cx-slate); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.cx-tabsbar > button.is-active { color: var(--cx-blue); font-weight: 600; }
.cx-tabsbar > button.is-active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; border-radius: 2px; background: var(--cx-blue); }

/* B · Corps */
.cx-detail-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cx-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cx-block { padding: 18px 20px; }
.cx-block > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cx-block > header h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 16px; }
.cx-block > header p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.cx-handle { color: var(--cx-blue); font-weight: 600; font-size: 14px; }
.cx-head-badges { display: inline-flex; align-items: center; gap: 8px; }
.cx-account-block.is-revoked { opacity: 0.75; }
.cx-add-account-wide { align-self: flex-start; }

.cx-arows { display: flex; flex-direction: column; gap: 10px; }
.cx-arow { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--cx-border); border-radius: 10px; background: #fff; }
.cx-arow > .cx-arow-icon { flex: none; }
.cx-arow > .cx-arow-body { flex: 1 1 220px; }
.cx-arow > .cx-arow-actions { margin-left: auto; }
.cx-arow.is-revoked { background: #fafbfd; }
.cx-arow.is-revoked .cx-arow-body strong { color: var(--cx-slate); }
.cx-arow-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--cx-blue-soft); color: var(--cx-blue); }
.cx-arow-icon svg { width: 18px; height: 18px; }
.cx-arow-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cx-arow-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 2px; }
.cx-arow-body strong { font-size: 13.5px; overflow-wrap: anywhere; }
.cx-arow-body small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.cx-arow-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }

.cx-agent-panel { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 4px 12px; margin-top: 14px; padding: 14px; border: 1px solid #f6d9ae; border-radius: 10px; background: var(--cx-orange-soft); }
.cx-agent-panel.is-open { border-color: #bfe3cf; background: #f1faf5; }
.cx-agent-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; color: var(--cx-orange); }
.cx-agent-panel.is-open .cx-agent-icon { color: var(--cx-green); }
.cx-agent-icon svg { width: 22px; height: 22px; }
.cx-agent-panel strong { color: #9a5200; font-size: 14px; }
.cx-agent-panel.is-open strong { color: var(--cx-green); }
.cx-agent-panel p { margin: 3px 0 0; color: #5b4a33; font-size: 12.5px; line-height: 1.45; }
.cx-agent-panel.is-open p { color: #34503f; }
.cx-agent-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cx-agent-details { margin-top: 8px; font-size: 12.5px; }
.cx-agent-details summary { color: var(--text); cursor: pointer; font-weight: 600; }
.cx-agent-details ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; margin: 8px 0 0; padding: 0; list-style: none; }
.cx-agent-details li { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.cx-agent-details li.is-on { color: var(--cx-green); }
.cx-agent-details li svg { width: 13px; height: 13px; }

.cx-caprows { display: flex; flex-direction: column; border: 1px solid var(--cx-border); border-radius: 10px; overflow: hidden; }
.cx-caprow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 9px 12px; border-bottom: 1px solid var(--cx-border); font-size: 13px; }
.cx-caprow:last-child { border-bottom: 0; }
.cx-capchips { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.cx-capchip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border: 1px solid var(--cx-border); border-radius: 6px; background: #fff; color: var(--cx-slate); font-size: 11.5px; font-style: normal; white-space: nowrap; }
.cx-capchip.is-on { border-color: var(--line-strong); background: var(--cx-blue-soft); color: var(--brand-blue-dark); font-weight: 600; }
.cx-capchip.is-off { border-style: dashed; color: #9aa6b8; }
.cx-capchip.is-idle { color: var(--cx-slate); }

.cx-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cx-quick-button { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--cx-border); border-radius: 10px; background: #fff; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.cx-quick-button:hover { border-color: #c9d8ec; background: #f9fbff; }
.cx-quick-button > span { grid-row: 1 / 3; display: inline-grid; place-items: center; width: 34px; height: 34px; color: var(--cx-blue); }
.cx-quick-button > span svg { width: 20px; height: 20px; }
.cx-quick-button strong { font-size: 14px; }
.cx-quick-button small { color: var(--muted); font-size: 12px; }
.cx-quick-button.is-primary { border-color: var(--cx-blue); background: var(--cx-blue); color: #fff; }
.cx-quick-button.is-primary > span, .cx-quick-button.is-primary small { color: rgba(255, 255, 255, 0.9); }
.cx-quick-button.is-primary:hover { background: #1765cc; }
.cx-quick-button[disabled] { cursor: not-allowed; background: #fafbfd; color: var(--cx-slate); }
.cx-quick-button[disabled] > span { color: #9aa9bf; }

.cx-policy-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cx-policy-line > .cx-link { margin-left: auto; }
.cx-pchip { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 4px 10px; border: 1px solid var(--cx-border); border-radius: 8px; background: #fafbfd; color: var(--text); font: inherit; font-size: 12.5px; }
.cx-pchip svg { width: 14px; height: 14px; color: var(--cx-slate); }
.cx-pchip.is-bad { border-color: #f3c7c3; background: var(--cx-red-soft); }
.cx-pchip.is-info { border-color: #cfe0f7; background: var(--cx-blue-soft); }
.cx-pchip > button { padding: 0; border: 0; background: none; color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; }
.cx-pchip-link { display: inline-grid; place-items: center; }
.cx-resource-line { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.cx-bridge-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 12px 14px; border: 1px solid var(--cx-border); border-radius: 10px; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.cx-bridge-row:hover { background: #f9fbff; }
.cx-bridge-row > span { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--cx-blue-soft); color: var(--cx-blue); }
.cx-bridge-row > div { display: flex; flex-direction: column; gap: 2px; }
.cx-bridge-row strong { font-size: 13.5px; }
.cx-bridge-row small { color: var(--muted); font-size: 12px; }
.cx-bridge-row > svg { width: 16px; height: 16px; color: var(--muted); }

/* C · Vault */
.cx-segment { display: inline-flex; gap: 4px; margin-bottom: 14px; padding: 4px; border-radius: 10px; background: #eef2f8; }
.cx-segment > button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: var(--cx-slate); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.cx-segment > button span { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 999px; background: #dfe6f1; color: var(--cx-slate); font-size: 11px; }
.cx-segment > button.is-active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(15, 40, 80, 0.1); }
.cx-vtoolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 12px; }
.cx-vtoolbar .cx-search { width: min(100%, 330px); }
.cx-vtoolbar-end { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.cx-viewswitch { display: inline-flex; border: 1px solid var(--cx-border); border-radius: 8px; overflow: hidden; }
.cx-viewswitch > button { display: inline-grid; place-items: center; width: 34px; height: 32px; border: 0; background: #fff; color: var(--cx-slate); cursor: pointer; }
.cx-viewswitch > button + button { border-left: 1px solid var(--cx-border); }
.cx-viewswitch > button.is-active { background: var(--cx-blue-soft); color: var(--cx-blue); }
.cx-viewswitch svg { width: 15px; height: 15px; }
.cx-inline-note { display: flex; align-items: center; gap: 8px; margin: -4px 0 12px; color: var(--cx-orange); font-size: 12.5px; }
.cx-inline-note svg { width: 14px; height: 14px; }

.cx-vcat { margin-bottom: 12px; padding: 4px 16px 6px; }
.cx-vcat > header { margin: 0; padding: 12px 0; cursor: pointer; }
.cx-vcat > header p { flex: 1; margin: 0 0 0 6px; color: var(--muted); font-size: 12.5px; }
.cx-vcat > header > svg { width: 16px; height: 16px; color: var(--cx-slate); }
.cx-vcat.is-collapsed > header { padding-bottom: 10px; }
.cx-vrows { display: flex; flex-direction: column; border-top: 1px solid var(--cx-border); }
.cx-vgroup { border-bottom: 1px solid var(--cx-border); }
.cx-vgroup:last-child { border-bottom: 0; }
.cx-vgroup.is-open { background: #fbfcfe; }
.cx-vrow { display: grid; grid-template-columns: 42px minmax(170px, 1.5fr) minmax(150px, auto) 74px 128px 78px auto; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--cx-border); cursor: pointer; }
.cx-vrows > .cx-vrow:last-child, .cx-vgroup > .cx-vrow:last-child { border-bottom: 0; }
.cx-vgroup > .cx-vrow.is-group { border-bottom: 0; }
.cx-vgroup.is-open > .cx-vrow.is-group { border-bottom: 1px dashed var(--cx-border); }
.cx-vrow:hover { background: #f7faff; }
.cx-vrow.is-child { grid-template-columns: 42px minmax(170px, 1.5fr) minmax(150px, auto) 74px 128px 78px auto; padding-left: 4px; }
.cx-vrow-indent { width: 42px; height: 24px; border-left: 2px solid var(--cx-border); margin-left: 20px; }
.cx-vrow.is-revoked .cx-vrow-title strong { color: var(--cx-slate); }
.cx-vrow-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cx-vrow-title strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-vrow-title small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-vrow-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.cx-vrow-date { display: flex; flex-direction: column; color: var(--text); font-size: 12px; white-space: nowrap; }
.cx-vrow-date small { color: var(--muted); font-size: 11px; }
.cx-vrow-actions { display: flex; gap: 6px; justify-content: flex-end; }
.cx-vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; padding: 10px 0 12px; border-top: 1px solid var(--cx-border); }
.cx-vtile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; border: 1px solid var(--cx-border); border-radius: 10px; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.cx-vtile small { color: var(--muted); font-size: 12px; }

/* Drawer */
.cx-drawer-layer { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; background: rgba(13, 30, 60, 0.18); }
.cx-drawer-layer[hidden] { display: none; }
.cx-drawer { display: flex; flex-direction: column; width: min(460px, 100vw); height: 100%; background: #fff; border-left: 1px solid var(--cx-border); box-shadow: -18px 0 40px rgba(15, 40, 80, 0.12); animation: cx-drawer-in 0.18s ease-out; }
@keyframes cx-drawer-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.cx-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 6px; }
.cx-drawer-title { display: flex; align-items: center; gap: 14px; padding: 6px 20px 14px; }
.cx-drawer-title > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cx-drawer-title strong { font-size: 17px; overflow-wrap: anywhere; }
.cx-drawer-title small { color: var(--muted); font-size: 12.5px; }
.cx-segment.is-drawer { display: flex; margin: 0 20px 14px; }
.cx-segment.is-drawer > button { flex: 1; justify-content: center; }
.cx-drawer-body { flex: 1; overflow-y: auto; padding: 0 20px 16px; display: flex; flex-direction: column; gap: 12px; }
.cx-drawer-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--cx-border); background: #fff; }
.cx-drawer-foot > button { flex: 1; min-width: 110px; height: 40px; }
.cx-protected { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 12px 14px; border: 1px solid #bfe3cf; border-radius: 10px; background: #effaf3; }
.cx-protected > svg { width: 22px; height: 22px; color: var(--cx-green); }
.cx-protected strong { color: var(--cx-green); font-size: 13.5px; }
.cx-protected p { margin: 2px 0 0; color: #34503f; font-size: 12.5px; line-height: 1.45; }
.cx-dgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cx-dcard { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 14px; border: 1px solid var(--cx-border); border-radius: 10px; background: #fbfcfe; }
.cx-dcard.is-wide { grid-column: 1 / -1; }
.cx-dcard > small { color: var(--muted); font-size: 12px; }
.cx-dcard > div { font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }
.cx-dcaption { color: var(--muted); font-size: 11.5px; }
.cx-secure, .cx-copyline { display: flex; align-items: center; gap: 6px; }
.cx-secure b { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; letter-spacing: 0.08em; overflow-wrap: anywhere; }
.cx-secure b.is-revealed { letter-spacing: 0; color: var(--brand-blue-dark); }
.cx-copyline { justify-content: space-between; }
.cx-inline-logo { display: inline-flex; align-items: center; gap: 8px; }
.cx-inline-logo svg { width: 16px; height: 16px; color: var(--cx-blue); }
.cx-usage { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; }
.cx-usage svg { width: 14px; height: 14px; color: var(--cx-slate); }
.cx-timeline { display: flex; flex-direction: column; }
.cx-timeline > article { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--cx-border); }
.cx-timeline > article > span { width: 8px; height: 8px; border-radius: 50%; background: var(--cx-green); }
.cx-timeline > article > span.is-bad { background: var(--cx-red); }
.cx-timeline > article > div { display: flex; flex-direction: column; min-width: 0; }
.cx-timeline strong { font-size: 13px; }
.cx-timeline small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.cx-dform { display: flex; flex-direction: column; gap: 10px; }
.cx-dform label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.cx-dform input, .cx-dform select { height: 38px; padding: 0 10px; border: 1px solid var(--cx-border); border-radius: 8px; background: #fff; font: inherit; font-size: 13px; color: var(--text); }
.cx-dform > button { align-self: flex-start; }
.cx-consumers { display: grid; gap: 8px; margin: 0; }
.cx-consumers div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px; font-size: 12.5px; }
.cx-consumers dt { color: var(--muted); }
.cx-consumers dd { margin: 0; }
body.cx-drawer-open { overflow: hidden; }

@media (max-width: 1180px) {
  .cx-detail-head { grid-template-columns: minmax(0, 1fr); }
  .cx-vrow, .cx-vrow.is-child { grid-template-columns: 42px minmax(0, 1fr) 74px auto; }
  .cx-vrow-tags, .cx-vrow-date, .cx-vrow > .cx-guard { display: none; }
}

@media (max-width: 900px) {
  .cx-detail-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .cx-page-head { flex-direction: column; }
  .cx-head-actions { width: 100%; }
  .cx-head-actions > button { flex: 1; }
  .cx-filterbar-top { flex-direction: column; align-items: stretch; }
  .cx-search, .cx-vtoolbar .cx-search { width: 100%; }
  .cx-filterbar-end { justify-content: space-between; }
  .cx-pills { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .cx-pills > button { flex: none; }
  .cx-sgrid { grid-template-columns: minmax(0, 1fr); }
  .cx-fav-row { grid-auto-columns: 78%; }
  .cx-detail-head { padding: 30px 16px 16px; gap: 14px; }
  .cx-detail-main { align-items: flex-start; gap: 14px; }
  .cx-detail-main .cx-slogo.is-xl { width: 56px; height: 56px; border-radius: 14px; }
  .cx-detail-main h1 { font-size: 22px; }
  .cx-account-summary { grid-template-columns: 48px minmax(0, 1fr); }
  .cx-account-summary .cx-avatar { width: 48px; height: 48px; font-size: 16px; }
  .cx-account-summary-tools { grid-column: 1 / -1; justify-content: space-between; }
  .cx-tabsbar { padding: 0 6px; }
  .cx-block { padding: 14px; }
  .cx-block > header { flex-direction: column; }
  .cx-arow-icon { width: 36px; height: 36px; }
  .cx-arow > .cx-arow-actions { margin-left: 0; justify-content: flex-start; }
  .cx-agent-panel { grid-template-columns: minmax(0, 1fr); }
  .cx-agent-actions { grid-column: 1; }
  .cx-quick { grid-template-columns: minmax(0, 1fr); }
  .cx-policy-line > .cx-link { margin-left: 0; }
  .cx-vtoolbar-end { margin-left: 0; width: 100%; justify-content: space-between; }
  .cx-vtoolbar .cx-select { flex: 1; }
  .cx-vcat { padding: 2px 10px 4px; }
  .cx-vcat > header p { display: none; }
  .cx-vrow, .cx-vrow.is-child { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .cx-vrow > .cx-badge { display: none; }
  .cx-vrow-actions .cx-icon-spacer { display: none; }
  .cx-drawer { width: 100vw; }
  .cx-dgrid { grid-template-columns: minmax(0, 1fr); }
  .cx-drawer-foot > button { min-width: calc(50% - 4px); }
}
