/* Drop 1116: the header for clients, partners and experts, in two rows.
   Row 1 — the account bar (theme colors since drop 1118): logo, whose workspace this is (the dot's color tells client,
   partner or expert apart), a wide search, then help, the bell, language and theme, and you.
   Row 2 — the menu on paper, the current area underlined in gold.
   Loaded after the older rules, so it wins without editing them. */
.cx {
  --cx-ink: var(--bg-card); --cx-ink-2: color-mix(in srgb, var(--fg) 5%, var(--bg-card)); --cx-ink-3: color-mix(in srgb, var(--fg) 9%, var(--bg-card));
  --cx-on: var(--fg); --cx-on-2: var(--fg-2); --cx-line: var(--border-2);
  --cx-gold: var(--accent); --cx-gold-soft: color-mix(in srgb, var(--accent) 14%, transparent); --cx-gold-ink: var(--accent-text, var(--accent)); --cx-kind: var(--accent);
  --cx-row: var(--bg-card); --cx-row-line: var(--border-2); --cx-row-text: var(--fg-2); --cx-row-strong: var(--fg); --cx-row-hover: color-mix(in srgb, var(--fg) 5%, transparent);
  --cx-hover: color-mix(in srgb, var(--fg) 8%, transparent);
}
.cx.cx-partner { --cx-kind: #5AA9E6; } .cx.cx-expert { --cx-kind: #3CC48A; }

.cph.cx { height: auto; display: block; padding: 0; background: var(--cx-row); border-bottom: 0; box-shadow: 0 1px 0 var(--cx-row-line); }

/* ── row 1 ─────────────────────────────────────────────────────── */
.cx-bar { display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 22px; background: var(--cx-ink); color: var(--cx-on); min-width: 0; }
.cx .cph-logo { flex: none; display: flex; align-items: center; text-decoration: none; }
.cx .cph-logo img { height: 36px; width: auto; object-fit: contain; }
.cx .cph-logo span { color: var(--cx-on); }
.cx .cph-sep { background: var(--cx-line); height: 26px; }

/* whose workspace */
.cx-ws { flex: 0 1 auto; min-width: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; line-height: 1.2; }
.cx-ws i { grid-row: span 2; width: 8px; height: 8px; border-radius: 50%; background: var(--cx-kind); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cx-kind) 25%, transparent); }
.cx-ws-k { font-size: .7rem; color: var(--cx-on-2); white-space: nowrap; }
.cx-ws-n { font-size: .84rem; font-weight: 700; color: var(--cx-on); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }

/* search */
.cx .cx-search.cph-btn { flex: 0 1 520px; width: auto; min-width: 0; height: 40px; margin-inline: auto; padding: 0 8px 0 14px; justify-content: flex-start; gap: 10px; border-radius: 12px;
  background: var(--cx-ink-2); border: 1px solid var(--cx-line); color: var(--cx-on-2); font-size: .82rem; font-weight: 500; cursor: text; }
[dir="rtl"] .cx .cx-search.cph-btn { padding: 0 14px 0 8px; }
.cx .cx-search.cph-btn:hover { background: var(--cx-ink-3); border-color: color-mix(in srgb, var(--cx-gold) 40%, transparent); color: var(--cx-on-2); }
.cx .cx-search.cph-btn:focus-visible { outline: none; border-color: var(--cx-gold); box-shadow: 0 0 0 3px var(--cx-gold-soft); }
.cx .cx-search svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
.cx .cx-search > span { display: inline !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--cx-on-2); }
.cx .cx-search kbd { display: inline-flex !important; margin-inline-start: auto; font-family: inherit; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 7px;
  background: var(--cx-ink); border: 1px solid var(--cx-line); color: var(--cx-on-2); }

/* tools */
.cx .cph-actions { margin: 0; gap: 10px; flex: none; }
.cx-cap { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 12px; background: var(--cx-ink-2); box-shadow: inset 0 0 0 1px var(--cx-line); }
.cx .cx-bar .cph-btn:not(.cx-search) { width: 34px; height: 34px; border: 0; border-radius: 9px; background: none; color: var(--cx-on-2); }
.cx .cx-bar .cph-btn:not(.cx-search):hover, .cx .cx-bar .cph-btn:not(.cx-search):focus-visible { background: var(--cx-hover); color: var(--cx-on); border: 0; }
.cx .cx-bar .cph-btn:not(.cx-search):focus-visible { outline: 2px solid var(--cx-gold); outline-offset: 1px; }
.cx .cx-bar .cph-btn svg { width: 17px; height: 17px; }
.cx .cx-bar #cp-lang-btn { font-size: .78rem; font-weight: 700; }
.cx .cph-bell-badge { box-shadow: 0 0 0 2px var(--cx-ink-2); }
.cx .cx-bar .hd-btn-client.cph-btn { width: auto; height: 34px; padding: 0 12px; gap: 7px; border-radius: 10px; font-size: .8rem; font-weight: 700;
  background: var(--cx-gold-soft); color: var(--cx-gold-ink); border: 1px solid color-mix(in srgb, var(--cx-gold) 32%, transparent); }
.cx .cx-bar .hd-btn-client.cph-btn:hover { background: color-mix(in srgb, var(--cx-gold) 24%, transparent); color: var(--cx-on); border-color: color-mix(in srgb, var(--cx-gold) 45%, transparent); }
.cx .cx-bar .hd-btn-client svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* you */
.cx .cph-user-btn { height: 42px; padding: 4px 10px 4px 4px; border: 0; border-radius: 12px; gap: 9px; color: var(--cx-on); background: none; }
[dir="rtl"] .cx .cph-user-btn { padding: 4px 4px 4px 10px; }
.cx .cph-user-btn:hover, .cx .cph-user-btn[aria-expanded="true"] { background: var(--cx-hover); }
.cx .cph-user-btn .cph-avatar, .cx .cph-user-btn .cph-avatar-img { width: 32px; height: 32px; box-shadow: 0 0 0 2px var(--cx-ink), 0 0 0 3.5px color-mix(in srgb, var(--cx-kind) 70%, transparent); }
.cx .cph-uname { color: var(--cx-on); font-size: .8rem; font-weight: 700; }
.cx .cph-user-btn > svg { color: var(--cx-on-2); }
.cx .cph-burger span { background: var(--cx-on) !important; }

/* ── row 2: the menu ───────────────────────────────────────────── */
.cx-navrow { height: 48px; padding: 0 14px; display: flex; align-items: stretch; background: var(--cx-row); border-top: 1px solid var(--cx-row-line); }
.cx-navrow > .cph-nav { flex: 1; display: flex; align-items: stretch; gap: 2px; min-width: 0; }
.cx-navrow .cph-grp { display: flex; align-items: stretch; }
.cx-navrow .cph-link { height: 48px; padding: 0 12px; border: 0; border-radius: 0; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--cx-row-text); position: relative; background: none; }
.cx-navrow .cph-link svg { width: 16px; height: 16px; opacity: .7; }
.cx-navrow .cph-link:hover, .cx-navrow .cph-grp-btn[aria-expanded="true"] { background: var(--cx-row-hover); color: var(--cx-row-strong); }
.cx-navrow .cph-link.cp-nav-active { background: none; border: 0; color: var(--cx-row-strong); font-weight: 700; }
.cx-navrow .cph-link.cp-nav-active svg { opacity: 1; color: var(--cx-gold); }
.cx-navrow .cph-link.cp-nav-active::after { content: ""; position: absolute; inset-inline: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--cx-gold); }
.cx-navrow .cph-link:focus-visible { outline: 2px solid var(--cx-gold); outline-offset: -4px; border-radius: 8px; }
.cx-navrow .cph-grp-caret { opacity: .45; }
.cx-navrow .cph-grp-menu { inset-block-start: 100%; padding-block-start: 0; }
.cx-navrow .nc-b { box-shadow: none; }

@media (max-width: 1500px) {
  .cx-navrow .cph-link { padding: 0 9px; font-size: .84rem; }
  .cx-navrow .cph-link > svg, .cx-navrow .cph-grp-btn > svg:first-child { display: none; }
  .cx-ws-n { max-width: 180px; }
}
@media (max-width: 1320px) {
  .cx .cx-search kbd { display: none !important; }
  .cx .cph-uname { display: none; }
  .cx .cx-bar .hd-btn-client.cph-btn { width: 34px; padding: 0; justify-content: center; } .cx .cx-bar .hd-btn-client > :not(svg) { display: none; }
  .cx .cph-user-btn { padding: 4px !important; }
  .cx-navrow .cph-link { padding: 0 7px; font-size: .82rem; }
}
@media (max-width: 1180px) { .cx-ws-k { display: none; } .cx-ws { grid-template-columns: auto 1fr; } .cx-ws i { grid-row: auto; } }
/* tablets and phones: the menu moves into the drawer, search becomes an icon */
@media (max-width: 1060px) {
  .cx-navrow { display: none; }
  .cx .cx-search.cph-btn { flex: 0 0 40px; width: 40px; padding: 0; justify-content: center; margin-inline-start: auto; margin-inline-end: 0; }
  .cx .cx-search > span, .cx .cx-search kbd { display: none !important; }
  .cx-ws { display: none; }
  .cx-bar { padding: 0 14px; gap: 10px; }
}
@media (max-width: 480px) {
  .cx-bar { padding: 0 10px; gap: 6px; }
  .cx .cph-actions { gap: 4px; }
  .cx .cph-logo img { height: 28px; max-width: 96px; }
  .cx-cap { padding: 2px; }
  .cx .cph-sep { display: none; }
}
[dir="rtl"] .cx .cx-search kbd { margin-left: 0 !important; margin-right: auto !important; }
