/* ------------------------------------------------------------------
   WhatsIQ theme overlay for aioCRM
   ------------------------------------------------------------------
   aioCRM ships as a minified bundle with no React source, so the look
   is matched from the outside: this sheet repaints MUI's own stable
   class names (MuiDrawer-paper, MuiPaper-root, MuiButton-root, …) and
   never the emotion hashes (mui-719mj9), which change on every build.

   Tokens below are lifted verbatim from the WhatsIQ app shell
   (/home/whatsiq/crm/custom/public/app/index.html :root).

   This changes colour, type, radius and weight ONLY. No element is
   added, removed, moved or resized beyond its own padding/height.
   ------------------------------------------------------------------ */

:root {
  /* surfaces */
  --wiq-frame: #f1f4f0;
  --wiq-sheet: #ffffff;
  --wiq-edge: #e4e8e3;
  --wiq-border: #e6e9e5;
  --wiq-rule: #eff1ee;
  --wiq-raised: #f7f8f6;
  --wiq-active: #e6ebe5;
  --wiq-hover: #e9ede8;
  --wiq-control: #cfd5ce;

  /* ink */
  --wiq-text: #141714;
  --wiq-muted: #575d57;
  --wiq-faint: #666c66;
  --wiq-nav-ink: #3c423c;

  /* brand */
  --wiq-primary: #161a17;
  --wiq-primary-hover: #2b302c;
  --wiq-accent: #13804f;
  --wiq-accent-soft: #e3f3ea;
  --wiq-positive: #1f7a4a;
  --wiq-negative: #c4242a;

  /* geometry */
  --wiq-r-sheet: 16px;
  --wiq-r-card: 12px;
  --wiq-r-ctl: 8px;
  --wiq-r-chip: 6px;

  /* type */
  --wiq-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wiq-head: "Spline Sans", "Inter", system-ui, sans-serif;
}

/* =================================================================
   1. Typography — Inter for body, Spline Sans for headings
   ================================================================= */

body,
.MuiTypography-root,
.MuiButton-root,
.MuiInputBase-root,
.MuiInputLabel-root,
.MuiMenuItem-root,
.MuiListItemText-primary,
.MuiListItemText-secondary,
.MuiChip-label,
.MuiTab-root,
.MuiTableCell-root,
.MuiTooltip-tooltip,
.MuiAlert-message,
.MuiFormHelperText-root,
.MuiBadge-badge,
.MuiAutocomplete-option {
  font-family: var(--wiq-font) !important;
}

h1, h2, h3, h4, h5, h6,
.MuiTypography-h1, .MuiTypography-h2, .MuiTypography-h3,
.MuiTypography-h4, .MuiTypography-h5, .MuiTypography-h6,
.MuiDialogTitle-root,
.MuiCardHeader-title {
  font-family: var(--wiq-head) !important;
  letter-spacing: -0.01em;
  color: var(--wiq-text);
}

code, pre, .MuiTypography-overline {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
}

/* =================================================================
   2. Page frame
   ================================================================= */

body {
  background: var(--wiq-frame) !important;
  color: var(--wiq-text) !important;
}

/* =================================================================
   3. Sidebar
   ================================================================= */

.MuiDrawer-paper {
  background: var(--wiq-sheet) !important;
  border-right: 1px solid var(--wiq-border) !important;
  color: var(--wiq-nav-ink) !important;
}

/* Section headings — "MENU", "CHANNELS", "MESSAGING" …
   WhatsIQ rules them off from the group above. */
.MuiDrawer-paper .MuiListSubheader-root,
.MuiDrawer-paper .MuiTypography-overline,
.MuiDrawer-paper .MuiTypography-caption,
.MuiDrawer-paper .MuiList-root > p.MuiTypography-root {
  font-family: var(--wiq-font) !important;
  font-size: 12px !important;
  line-height: 16px !important;
  font-weight: 500 !important;
  color: var(--wiq-faint) !important;
  background: transparent !important;
  letter-spacing: 0.04em;
}

/* Nav rows */
.MuiDrawer-paper .MuiListItemButton-root {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 10px !important;
  margin: 1px 0 !important;
  border-radius: var(--wiq-r-ctl) !important;
  color: var(--wiq-nav-ink) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  gap: 10px;
  transition: background 0.15s ease;
}

.MuiDrawer-paper .MuiListItemButton-root .MuiListItemText-primary {
  font-size: 12px !important;
  font-weight: inherit !important;
  color: inherit !important;
}

.MuiDrawer-paper .MuiListItemButton-root:hover {
  background: var(--wiq-hover) !important;
}

.MuiDrawer-paper .MuiListItemButton-root.Mui-selected,
.MuiDrawer-paper .MuiListItemButton-root[aria-current="page"] {
  background: var(--wiq-active) !important;
  color: var(--wiq-text) !important;
  font-weight: 500 !important;
}

.MuiDrawer-paper .MuiListItemButton-root.Mui-selected:hover {
  background: var(--wiq-active) !important;
}

.MuiDrawer-paper .MuiListItemButton-root.Mui-selected .MuiListItemText-primary {
  font-weight: 500 !important;
}

/* Icons follow the row's ink rather than carrying their own colour */
.MuiDrawer-paper .MuiListItemIcon-root,
.MuiDrawer-paper .MuiListItemButton-root svg {
  color: inherit !important;
  min-width: 0 !important;
  margin-right: 0 !important;
}

.MuiDrawer-paper .MuiListItemButton-root svg {
  width: 14px;
  height: 14px;
}

/* Unread / count pill — dark, like WhatsIQ's .cnt */
.MuiDrawer-paper .MuiBadge-badge,
.MuiDrawer-paper .MuiChip-root {
  background: var(--wiq-text) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  border: 0 !important;
}

.MuiDrawer-paper .MuiDivider-root {
  border-color: var(--wiq-edge) !important;
}

/* Sidebar search box */
.MuiDrawer-paper .MuiInputBase-root {
  background: var(--wiq-raised) !important;
  border-radius: var(--wiq-r-ctl) !important;
  font-size: 13px !important;
  color: var(--wiq-muted) !important;
}

.MuiDrawer-paper .MuiOutlinedInput-notchedOutline {
  border-color: var(--wiq-control) !important;
}

/* =================================================================
   4. Panels — Paper, Card, Dialog, Menu, Popover
   ================================================================= */

.MuiPaper-root {
  background-color: var(--wiq-sheet);
  color: var(--wiq-text);
  background-image: none !important;
}

.MuiPaper-rounded {
  border-radius: var(--wiq-r-card) !important;
}

.MuiPaper-outlined,
.MuiCard-root {
  border: 1px solid var(--wiq-border) !important;
  border-radius: var(--wiq-r-card) !important;
  box-shadow: none !important;
}

/* Raised surfaces keep a hairline instead of MUI's grey shadow stack */
.MuiPaper-elevation1,
.MuiPaper-elevation2,
.MuiPaper-elevation3,
.MuiPaper-elevation4 {
  box-shadow: none !important;
  border: 1px solid var(--wiq-border) !important;
}

/* Floating surfaces keep a soft shadow so they read as above the page */
.MuiMenu-paper,
.MuiPopover-paper,
.MuiAutocomplete-paper,
.MuiDialog-paper {
  border-radius: var(--wiq-r-card) !important;
  border: 1px solid var(--wiq-border) !important;
  box-shadow: 0 10px 30px rgba(20, 23, 20, 0.1) !important;
}

.MuiDialog-paper {
  border-radius: var(--wiq-r-sheet) !important;
}

.MuiCardHeader-root,
.MuiDialogTitle-root {
  border-bottom: 1px solid var(--wiq-rule);
}

.MuiDivider-root {
  border-color: var(--wiq-rule) !important;
}

.MuiTableCell-root {
  border-bottom-color: var(--wiq-rule) !important;
  font-size: 13px !important;
}

.MuiTableHead-root .MuiTableCell-root {
  background: var(--wiq-raised) !important;
  color: var(--wiq-muted) !important;
  font-weight: 500 !important;
}

/* =================================================================
   5. Buttons
   ================================================================= */

.MuiButton-root {
  min-height: 32px !important;
  border-radius: var(--wiq-r-ctl) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
  padding: 0 14px !important;
  gap: 8px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.MuiButton-root:active {
  transform: translateY(0.5px);
}

/* Solid — WhatsIQ's .btn.pri is near-black, not the accent */
.MuiButton-contained,
.MuiButton-containedPrimary {
  background: var(--wiq-primary) !important;
  color: #fff !important;
  border: 1px solid var(--wiq-primary) !important;
}

.MuiButton-contained:hover,
.MuiButton-containedPrimary:hover {
  background: var(--wiq-primary-hover) !important;
  border-color: var(--wiq-primary-hover) !important;
  box-shadow: none !important;
}

.MuiButton-containedSuccess {
  background: var(--wiq-accent) !important;
  border-color: var(--wiq-accent) !important;
}

.MuiButton-containedError {
  background: var(--wiq-negative) !important;
  border-color: var(--wiq-negative) !important;
}

/* Secondary — white with a hairline, WhatsIQ's .btn.sec */
.MuiButton-outlined,
.MuiButton-outlinedPrimary {
  background: var(--wiq-sheet) !important;
  border: 1px solid var(--wiq-control) !important;
  color: var(--wiq-text) !important;
}

.MuiButton-outlined:hover,
.MuiButton-outlinedPrimary:hover {
  background: var(--wiq-raised) !important;
  border-color: var(--wiq-control) !important;
}

.MuiButton-outlinedError {
  border-color: #e9b4b2 !important;
  color: var(--wiq-negative) !important;
}

/* Quiet — WhatsIQ's .btn.ghost */
.MuiButton-text,
.MuiButton-textPrimary {
  color: var(--wiq-text) !important;
  padding: 0 10px !important;
}

.MuiButton-text:hover {
  background: var(--wiq-raised) !important;
}

.MuiButton-root.Mui-disabled {
  opacity: 0.45 !important;
}

/* Icon buttons */
.MuiIconButton-root {
  border-radius: var(--wiq-r-ctl) !important;
  color: #454b45;
}

.MuiIconButton-root:hover {
  background: var(--wiq-raised) !important;
}

/* Floating action button keeps the pill */
.MuiFab-root {
  background: var(--wiq-primary) !important;
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(20, 23, 20, 0.18) !important;
}

/* =================================================================
   6. Accent — teal → WhatsIQ green, wherever MUI paints "primary"
   ================================================================= */

.MuiCheckbox-root.Mui-checked,
.MuiRadio-root.Mui-checked,
.MuiSwitch-colorPrimary.Mui-checked,
.MuiCircularProgress-colorPrimary,
.MuiLinearProgress-barColorPrimary,
.MuiTab-root.Mui-selected,
.MuiLink-root,
a.MuiTypography-root {
  color: var(--wiq-accent) !important;
}

.MuiSwitch-colorPrimary.Mui-checked + .MuiSwitch-track,
.MuiLinearProgress-barColorPrimary,
.MuiTabs-indicator {
  background-color: var(--wiq-accent) !important;
}

.MuiChip-colorPrimary,
.MuiChip-filledPrimary {
  background: var(--wiq-accent-soft) !important;
  color: var(--wiq-accent) !important;
  border-radius: var(--wiq-r-chip) !important;
  font-weight: 500 !important;
}

.MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
  border-color: var(--wiq-accent) !important;
  border-width: 1px !important;
}

.MuiInputLabel-root.Mui-focused {
  color: var(--wiq-accent) !important;
}

/* Inputs */
.MuiOutlinedInput-root {
  border-radius: var(--wiq-r-ctl) !important;
  font-size: 13px !important;
}

.MuiOutlinedInput-notchedOutline {
  border-color: var(--wiq-control) !important;
}

/* Alerts keep WhatsIQ's soft tints */
.MuiAlert-standardSuccess {
  background: var(--wiq-accent-soft) !important;
  color: var(--wiq-positive) !important;
}

.MuiAlert-standardError {
  background: #ffedea !important;
  color: #831c1e !important;
}

.MuiAlert-standardWarning {
  background: #fff6e0 !important;
  color: #8a4a07 !important;
}

.MuiAlert-root {
  border-radius: var(--wiq-r-card) !important;
}

/* =================================================================
   7. Scrollbars — thin, to match the WhatsIQ nav
   ================================================================= */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--wiq-control) transparent;
}

*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb {
  background: var(--wiq-control);
  border-radius: 999px;
}
*::-webkit-scrollbar-track { background: transparent; }

/* =================================================================
   8. Universal Inbox — the conversation list
   -----------------------------------------------------------------
   Every value below is lifted from WhatsIQ's own inbox CSS
   (custom/public/app/index.html, lines 236–304 and 364–388), not
   invented:

     .list            border-right:1px solid var(--border)
     .lhead           padding:14px 14px 12px; border-bottom:1px var(--edge)
     .lhead h1        600 18px/24px Spline Sans; letter-spacing:-.01em
     .lsearch input   h32; radius 8; 1px var(--border); #fff; 13px
     .viewrow         padding:8px 12px; border-bottom:1px var(--border)
     .vselb .n        18px pill, var(--active), 11px/600, var(--muted)
     .rows            padding:0 0 12px
     .rows .crow      radius 0; border-bottom 1px var(--edge); pad 10px 14px
     .crow            grid 36px + 1fr, gap 12px
     .crow:hover      var(--raised)
     .crow[sel]       var(--active) + box-shadow inset 2px 0 0 var(--text)
     .crow.unread     ::before 3px accent bar, left 2, top/bottom 10
     .crow .l1 b      500  (unread 700)
     .crow .l1 time   12px var(--faint)
     .crow .l2 p      13px/18px var(--muted)  (unread var(--text) 500)
     .crow .uc        19px pill, var(--accent), #fff, 11px/700
     .av              36px circle, hsl(var(--h) 55% 88%), ink #1d231d
     .crow .rlab      11px/16px 600, radius 4, tinted by label colour

   SELECTOR SAFETY. aioCRM ships a minified bundle with no source, so
   nothing here may lean on an emotion hash (mui-y6ijyb) — those change
   on every vendor build. Two stable hooks carry this whole section:

     1. A conversation row is the only ListItemButton whose first child
        is a Box containing an Avatar:
          .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root)
        The sidebar's rows use MuiListItemIcon, so they cannot match.
     2. A row is UNREAD when its second text line carries a count Box
        beside the preview paragraph:
          :has(> .MuiBox-root > .MuiStack-root:nth-child(2) > .MuiBox-root)
        A read row's second line holds the paragraph alone.

   A clicked row gains a MuiTouchRipple span as its LAST child, so the
   text column is reached as :nth-child(2); :last-child silently stops
   matching the moment a row has been clicked.

   Nothing is added, and nothing that can be clicked is hidden. The one
   thing removed is the third line of each row ("WhatsApp · <account>"),
   because WhatsIQ's rows are two lines; the channel is still shown by
   the badge on the avatar. Delete rule 8.9 to bring it back.
   ================================================================= */

/* The list column. Scoped to the FIRST section of the inbox layout so
   the other pages, which use the same MUI classes, are untouched. */

/* --- 8.1 the column itself --------------------------------------- */
main > .MuiBox-root > section:first-child {
  border-right: 1px solid var(--wiq-border) !important;
}

/* --- 8.2 header: title, count, actions --------------------------- */
main > .MuiBox-root > section:first-child > .MuiBox-root:first-child {
  padding: 14px 14px 12px !important;
  border-bottom: 1px solid var(--wiq-edge) !important;
}

/* "Inbox" — WhatsIQ sets its list heading in Spline Sans */
main > .MuiBox-root > section:first-child
  > .MuiBox-root:first-child .MuiStack-root > p.MuiTypography-root:first-child {
  font-family: var(--wiq-head) !important;
  font-size: 18px !important;
  line-height: 24px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  color: var(--wiq-text) !important;
}

/* the count beside it — WhatsIQ's .vselb .n.
   Safe to style now only because this is scoped to the header box; the
   unread badge lives inside a row and is reached by 8.11. The
   adjacent-sibling step matters: the header Stack also holds a
   zero-height spacer Box, and a bare `> .MuiBox-root` paints that
   too. */
main > .MuiBox-root > section:first-child
  > .MuiBox-root:first-child .MuiStack-root > p.MuiTypography-root:first-child + .MuiBox-root {
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 5px !important;
  border-radius: 9px !important;
  background: var(--wiq-active) !important;
  color: var(--wiq-muted) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 18px !important;
  text-align: center !important;
}

/* the icon buttons — WhatsIQ's .lhead .t .btn is muted until hovered */
main > .MuiBox-root > section:first-child
  > .MuiBox-root:first-child .MuiIconButton-root {
  color: var(--wiq-muted) !important;
  border-radius: var(--wiq-r-ctl) !important;
}
main > .MuiBox-root > section:first-child
  > .MuiBox-root:first-child .MuiIconButton-root:hover {
  background: var(--wiq-active) !important;
  color: var(--wiq-text) !important;
}

/* --- 8.3 search field -------------------------------------------- */
main > .MuiBox-root > section:first-child .MuiOutlinedInput-root {
  height: 32px !important;
  background: var(--wiq-sheet) !important;
  border-radius: var(--wiq-r-ctl) !important;
  font-size: 13px !important;
}
main > .MuiBox-root > section:first-child
  .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline {
  border-color: var(--wiq-border) !important;
}
main > .MuiBox-root > section:first-child
  .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
  border-color: var(--wiq-control) !important;
  border-width: 1px !important;
}

/* --- 8.4 the view row (All / Unread / Read) ----------------------- */
/* WhatsIQ puts a dropdown with a count here, not tabs. The tabs stay —
   a CSS sheet cannot turn three buttons into one menu — but they are
   given WhatsIQ's proportions and its selected-pill treatment instead
   of the vendor's underline. */
main > .MuiBox-root > section:first-child > .MuiStack-root {
  padding: 5px 12px !important;
  border-bottom: 1px solid var(--wiq-border) !important;
  min-height: 40px !important;
}
main > .MuiBox-root > section:first-child .MuiTabs-root,
main > .MuiBox-root > section:first-child .MuiTabs-scroller,
main > .MuiBox-root > section:first-child .MuiTabs-list {
  min-height: 30px !important;
}
main > .MuiBox-root > section:first-child .MuiTabs-list {
  gap: 2px !important;
}
main > .MuiBox-root > section:first-child .MuiTabs-indicator {
  display: none !important;
}
main > .MuiBox-root > section:first-child .MuiTab-root {
  min-height: 30px !important;
  height: 30px !important;
  min-width: 0 !important;
  padding: 0 10px !important;
  border-radius: var(--wiq-r-ctl) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  text-transform: none !important;
  color: var(--wiq-muted) !important;
}
main > .MuiBox-root > section:first-child .MuiTab-root:hover {
  background: var(--wiq-raised) !important;
}
main > .MuiBox-root > section:first-child .MuiTab-root.Mui-selected {
  background: var(--wiq-active) !important;
  color: var(--wiq-text) !important;
  font-weight: 600 !important;
}

/* --- 8.5 the scroll area ----------------------------------------- */
main > .MuiBox-root > section:first-child
  .MuiBox-root:has(> .MuiListItemButton-root) {
  padding: 0 0 12px !important;
}

/* --- 8.6 the row ------------------------------------------------- */
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root) {
  position: relative !important;
  align-items: flex-start !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  border-radius: 0 !important;
  border-bottom: 1px solid var(--wiq-edge) !important;
}
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root):hover {
  background: var(--wiq-raised) !important;
}
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root).Mui-selected,
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root).Mui-selected:hover {
  background: var(--wiq-active) !important;
  box-shadow: inset 2px 0 0 var(--wiq-text) !important;
}

/* The vendor draws a teal rail on the selected row. WhatsIQ marks the
   selected row with the inset edge above and keeps a rail only for
   unread, so the rail is zeroed here and re-coloured in 8.11. Geometry
   is restated because the vendor's sits at left:0 and is 3px rounded. */
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root)::before {
  content: "" !important;
  position: absolute !important;
  left: 2px !important;
  top: 10px !important;
  bottom: 10px !important;
  height: auto !important;
  width: 3px !important;
  border-radius: 2px !important;
  background: transparent !important;
}

/* --- 8.7 avatar: 36px circle, and the channel badge follows it ---- */
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root)
  > .MuiBox-root:first-child {
  width: 36px !important;
  height: 36px !important;
  flex: none !important;
}
main .MuiListItemButton-root > .MuiBox-root > .MuiAvatar-root {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  font-family: var(--wiq-font) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  color: #1d231d !important;
  border: 0 !important;
}
/* the little WhatsApp disc: pinned to the avatar's bottom-right corner
   rather than to the box it used to sit in, which was 42px wide. */
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root)
  > .MuiBox-root:first-child > .MuiBox-root {
  inset: auto -3px -3px auto !important;
  width: 15px !important;
  height: 15px !important;
}
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root)
  > .MuiBox-root:first-child > .MuiBox-root > .MuiBox-root {
  width: 15px !important;
  height: 15px !important;
}
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root)
  > .MuiBox-root:first-child > .MuiBox-root svg {
  width: 10px !important;
  height: 10px !important;
}

/* --- 8.8 one pastel per contact ---------------------------------- */
/* WhatsIQ: .av{background:hsl(var(--h) 55% 88%)}, the hue derived from
   the name. aioCRM paints one flat brand teal and its bundle has no hue
   function, so the ring of hues is cycled down the list instead. NOTE:
   this keys off row POSITION, so a contact's colour moves when the list
   reorders. WhatsIQ's is stable. The six hues Hassan's own screenshot
   sampled (#d1f1df #f3d0d5 #ecf2d0 #d2d1f3 #cfecf0 #f3e4d0) are the
   first six here. */
main .MuiListItemButton-root:nth-child(8n + 1) > .MuiBox-root > .MuiAvatar-root { background: hsl(152 55% 88%) !important; }
main .MuiListItemButton-root:nth-child(8n + 2) > .MuiBox-root > .MuiAvatar-root { background: hsl(352 55% 88%) !important; }
main .MuiListItemButton-root:nth-child(8n + 3) > .MuiBox-root > .MuiAvatar-root { background: hsl( 72 55% 88%) !important; }
main .MuiListItemButton-root:nth-child(8n + 4) > .MuiBox-root > .MuiAvatar-root { background: hsl(242 55% 88%) !important; }
main .MuiListItemButton-root:nth-child(8n + 5) > .MuiBox-root > .MuiAvatar-root { background: hsl(188 55% 88%) !important; }
main .MuiListItemButton-root:nth-child(8n + 6) > .MuiBox-root > .MuiAvatar-root { background: hsl( 32 55% 88%) !important; }
main .MuiListItemButton-root:nth-child(8n + 7) > .MuiBox-root > .MuiAvatar-root { background: hsl(112 55% 88%) !important; }
main .MuiListItemButton-root:nth-child(8n + 8) > .MuiBox-root > .MuiAvatar-root { background: hsl(226 55% 88%) !important; }

/* --- 8.9 the three text lines ------------------------------------ */
/* line 1 — name and time */
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root)
  > .MuiBox-root:nth-child(2) > .MuiStack-root:nth-child(1) > p.MuiTypography-root:first-child {
  font-size: 14px !important;
  line-height: 20px !important;
  font-weight: 500 !important;
  color: var(--wiq-text) !important;
}
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root)
  > .MuiBox-root:nth-child(2) > .MuiStack-root:nth-child(1) > p.MuiTypography-root:last-child {
  font-size: 12px !important;
  line-height: 20px !important;
  color: var(--wiq-faint) !important;
  flex: none !important;
}

/* line 2 — preview */
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root)
  > .MuiBox-root:nth-child(2) > .MuiStack-root:nth-child(2) {
  margin-top: 2px !important;
}
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root)
  > .MuiBox-root:nth-child(2) > .MuiStack-root:nth-child(2) > p.MuiTypography-root {
  font-size: 13px !important;
  line-height: 18px !important;
  color: var(--wiq-muted) !important;
}

/* line 3 — "WhatsApp · <account>". WhatsIQ's rows are two lines, with
   the channel shown as an icon; here it is already on the avatar, so
   the text is dropped. The labels beside it stay. */
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root)
  > .MuiBox-root:nth-child(2) > .MuiStack-root:nth-child(3) > p.MuiTypography-root:first-child {
  display: none !important;
}
/* a row with no label left has an empty third line — take it out */
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root)
  > .MuiBox-root:nth-child(2) > .MuiStack-root:nth-child(3):not(:has(.MuiChip-root)) {
  display: none !important;
}
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root)
  > .MuiBox-root:nth-child(2) > .MuiStack-root:nth-child(3) {
  margin-top: 4px !important;
  /* wiq-tweaks.js fills this line with every label the conversation has
     and measures the result against the row, so it has to clip rather
     than wrap for scrollWidth to mean anything. */
  flex-wrap: nowrap !important;
  overflow: hidden !important;
}
/* ...and the chips must not shrink, or they squeeze themselves thin and
   clip their own text instead of overflowing the line — which leaves
   scrollWidth equal to clientWidth, and the "+X" never appears. */
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root)
  > .MuiBox-root:nth-child(2) > .MuiStack-root:nth-child(3) > .MuiChip-root {
  flex: 0 0 auto !important;
}

/* --- 8.10 labels — WhatsIQ's .rlab ------------------------------- */
/* GEOMETRY ONLY — the colour belongs to the label.
   aioCRM already gives every label its own hue and paints it the way
   WhatsIQ's .rlab does: a 10% wash of that hue, full-strength text, a
   25% border. urgent is red, vip is blue, and the tag picker shows
   both. An earlier version of this rule flattened all of them to one
   grey, so the same label was grey in the list, black in Chat Info and
   coloured in the picker. Nothing here touches background, border or
   text colour, so all three now agree.
   A 10% wash also survives the selected row, which a solid fill in
   --active did not — that was the problem the grey was invented for. */
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root) .MuiChip-root {
  height: 16px !important;
  border-radius: 4px !important;
}
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root) .MuiChip-label {
  padding: 0 6px !important;
  font-size: 11px !important;
  line-height: 16px !important;
  font-weight: 600 !important;
}

/* --- 8.11 unread ------------------------------------------------- */
/* The count beside the preview is the only hook the bundle gives for
   "unread" — there is no class on the row. */
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root)
  > .MuiBox-root:nth-child(2) > .MuiStack-root:nth-child(2) > .MuiBox-root {
  flex: none !important;
  min-width: 19px !important;
  height: 19px !important;
  padding: 0 6px !important;
  border-radius: 999px !important;
  background: var(--wiq-accent) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 19px !important;
  text-align: center !important;
  font-variant-numeric: tabular-nums !important;
}

/* the row that carries one: green rail, heavier name, darker preview */
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root):has(> .MuiBox-root > .MuiStack-root:nth-child(2) > .MuiBox-root)::before {
  background: var(--wiq-accent) !important;
}
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root):has(> .MuiBox-root > .MuiStack-root:nth-child(2) > .MuiBox-root)
  > .MuiBox-root:nth-child(2) > .MuiStack-root:nth-child(1) > p.MuiTypography-root:first-child {
  font-weight: 700 !important;
}
main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root):has(> .MuiBox-root > .MuiStack-root:nth-child(2) > .MuiBox-root)
  > .MuiBox-root:nth-child(2) > .MuiStack-root:nth-child(2) > p.MuiTypography-root {
  color: var(--wiq-text) !important;
  font-weight: 500 !important;
}

/* =================================================================
   9. Universal Inbox — the conversation pane
   -----------------------------------------------------------------
   Mapped from WhatsIQ's own thread CSS, not invented:

     --chat        #f3f0e9   (the warm canvas; live render reads #f1f0ea)
     --bubble-in   #ffffff
     --bubble-out  #d9f6cf   (live render reads #dbf5cf)
     .chead        #fff, 10px 16px, min-height 60, 1px --border rule
     .day          #fff, radius 8, 12px, --muted, padding 3px 10px
     .m            radius 10, pad 7px 10px 6px 11px, 14px/20px,
                   box-shadow 0 1px 1px rgba(20,23,20,.06),
                   max-width min(70%,460px)
     .m.out        --bubble-out
     .m .meta      right-aligned, 11px/14px, #5f675f, margin-top 2
     .composer     #fff, 1px --border top rule

   The shell frame stays the cool #f1f4f0 while this canvas is warm
   cream. That contrast is WhatsIQ's design, not a slip.

   THE OUTGOING HOOK. aioCRM gives both bubbles the same classes. The
   only thing that tells them apart is that an outgoing one carries a
   delivery tick <svg> in its meta row and an incoming one does not —
   so `:has(svg)` is what picks out "ours". Verified against a real
   outgoing row.

   The tick's COLOUR is deliberately left alone. aioCRM paints it per
   delivery state; forcing WhatsIQ's blue would make a message that is
   only sent look read.
   ================================================================= */

:root {
  --wiq-chat: #f1f0ea;       /* sampled off the live WhatsIQ render */
  --wiq-bubble-in: #ffffff;
  --wiq-bubble-out: #dbf5cf; /* sampled off the live WhatsIQ render */
  --wiq-meta: #5f675f;
}

/* --- 9.1 the canvas ---------------------------------------------- */
main > .MuiBox-root > section:nth-of-type(2) {
  background: var(--wiq-chat) !important;
}

/* --- 9.2 the chat header ----------------------------------------- */
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(1) {
  background: var(--wiq-sheet) !important;
  border-bottom: 1px solid var(--wiq-border) !important;
  min-height: 60px !important;
  padding: 10px 16px !important;
}

/* the contact's name */
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(1)
  .MuiStack-root > .MuiBox-root > p.MuiTypography-root:first-child {
  font-size: 14px !important;
  line-height: 20px !important;
  font-weight: 600 !important;
  color: var(--wiq-text) !important;
}

/* the channel / number line under it — WhatsIQ's .chead .who small */
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(1)
  .MuiStack-root .MuiStack-root p.MuiTypography-root {
  font-size: 12px !important;
  line-height: 16px !important;
  color: var(--wiq-faint) !important;
}

/* the header avatar, to match the list's */
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(1)
  .MuiAvatar-root {
  border-radius: 50% !important;
  background: hsl(152 55% 88%) !important;
  color: #1d231d !important;
  border: 0 !important;
  font-family: var(--wiq-font) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

/* the actions. The call button keeps its green — it is an affordance,
   not decoration — so only the neutral ones are muted. */
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(1)
  .MuiIconButton-root:not(.MuiIconButton-colorSuccess) {
  color: var(--wiq-muted) !important;
  border-radius: var(--wiq-r-ctl) !important;
}
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(1)
  .MuiIconButton-root:not(.MuiIconButton-colorSuccess):hover {
  background: var(--wiq-active) !important;
  color: var(--wiq-text) !important;
}

/* --- 9.3 the day separator — WhatsIQ's .day ---------------------- */
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(2)
  .MuiBox-root > p.MuiTypography-root:only-child {
  background: var(--wiq-sheet) !important;
  color: var(--wiq-muted) !important;
  border-radius: var(--wiq-r-ctl) !important;
  padding: 3px 10px !important;
  font-size: 12px !important;
  line-height: 18px !important;
}

/* --- 9.4 the bubbles --------------------------------------------- */
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(2)
  .MuiPaper-root.MuiPaper-rounded {
  border-radius: 10px !important;
  padding: 7px 10px 6px 11px !important;
  box-shadow: 0 1px 1px rgba(20, 23, 20, 0.06) !important;
  border: 0 !important;
  max-width: min(70%, 460px) !important;
}

/* theirs — no delivery tick */
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(2)
  .MuiPaper-root.MuiPaper-rounded:not(:has(svg)) {
  background: var(--wiq-bubble-in) !important;
}

/* ours — carries the tick */
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(2)
  .MuiPaper-root.MuiPaper-rounded:has(svg) {
  background: var(--wiq-bubble-out) !important;
}

main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(2)
  .MuiPaper-root.MuiPaper-rounded > p.MuiTypography-root {
  font-size: 14px !important;
  line-height: 20px !important;
  color: var(--wiq-text) !important;
}

/* the time and tick under the text — WhatsIQ tucks them to the right */
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(2)
  .MuiPaper-root.MuiPaper-rounded .MuiStack-root {
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 5px !important;
  margin-top: 2px !important;
}
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(2)
  .MuiPaper-root.MuiPaper-rounded .MuiStack-root p.MuiTypography-root {
  font-size: 11px !important;
  line-height: 14px !important;
  color: var(--wiq-meta) !important;
}
/* size only — the colour carries the delivery state, see the note above */
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(2)
  .MuiPaper-root.MuiPaper-rounded .MuiStack-root svg {
  width: 15px !important;
  height: 15px !important;
}

/* --- 9.5 the composer -------------------------------------------- */
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(3) {
  background: var(--wiq-sheet) !important;
  border-top: 1px solid var(--wiq-border) !important;
}

/* The 24-hour-window notice. WhatsIQ sets it as a plain sentence on the
   white composer band — bold lead, grey remainder, no fill at all — with
   a black "Send a template" button beside it. The wording, the two
   weights and that button are all markup; what a stylesheet can do is
   take the amber box away and give the line WhatsIQ's type and colour. */
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(3)
  .MuiBox-root:has(> svg + p.MuiTypography-root) {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 2px 0 8px !important;
  align-items: flex-start !important;
}
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(3)
  .MuiBox-root:has(> svg + p.MuiTypography-root) > p.MuiTypography-root {
  font-size: 13px !important;
  line-height: 19px !important;
  color: var(--wiq-muted) !important;
}
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(3)
  .MuiBox-root:has(> svg + p.MuiTypography-root) > svg {
  color: var(--wiq-faint) !important;
}

/* --- 9.6 the thread fills the pane ------------------------------ */
/* The vendor caps the message column at 980px and the composer at 932px
   and centres both. With the sidebar open the pane is ~1014px wide, so
   the leftover is 17px and 23px and nobody sees it; collapse the sidebar
   and the pane grows to ~1178px while the caps do not, leaving ~99px and
   ~105px of dead space down each side — and the two bands never line up
   with each other anyway. WhatsIQ caps nothing: .msgs is padding
   18px 2% 12px and .composer is 12px 2% 14px, both full width. Same
   here, so the thread grows with the pane and both bands share one
   gutter. */
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(2)
  > .MuiBox-root {
  padding: 12px 2% !important;
}
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(2)
  > .MuiBox-root > .MuiBox-root {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(3) {
  padding: 12px 2% 14px !important;
}
main > .MuiBox-root > section:nth-of-type(2) > .MuiBox-root:nth-child(3)
  > .MuiBox-root {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}

/* send, while there is nothing to send */
main > .MuiBox-root > section:nth-of-type(2)
  .MuiIconButton-root.Mui-disabled {
  background: var(--wiq-raised) !important;
}

/* =================================================================
   10. Sidebar icons — WhatsIQ's outline set over aioCRM's filled one
   -----------------------------------------------------------------
   aioCRM draws its menu with Material's FILLED icons: one <path> per
   glyph, painted with `fill:currentColor`. WhatsIQ draws its own set
   as single-path OUTLINES — `fill:none; stroke:currentColor;
   stroke-width:1.6` (its app shell, svg.i at line 37). A stylesheet
   cannot rewrite a path's `d`, so each slot is turned into a MASK:
   the vendor's <svg> keeps its box but is made invisible, and the
   WhatsIQ path is laid over it as a mask on the icon container,
   filled with `currentColor`. The icon therefore still darkens with
   the row when it is selected or hovered — a background-image would
   have frozen one colour.

   Every path below is copied verbatim from WhatsIQ's own icon table
   (custom/public/app/index.html, `const P`), so these are literally
   the old icons, not lookalikes.

   THE HOOK. aioCRM's menu entries are <div role=button> with no href,
   no id and no data attribute, so there is nothing semantic to match
   on. What IS stable is the glyph itself: each rule keys on the first
   16 characters of that item's `d`. If a vendor release changes an
   icon, its rule stops matching and that one item quietly keeps the
   vendor glyph — nothing breaks.

   Three glyphs are used twice by the vendor (Inbox/Agent Reports,
   WhatsApp/WhatsApp QR, Twilio/Plivo). Where the two meanings differ,
   the rule is pinned to the entry's position in the menu as well; if
   the vendor reorders the menu those two swap icons, which is
   cosmetic, not a breakage.
   ================================================================= */

/* The icon container has no size of its own — it is sized by the <svg>
   inside it — so the <svg> is hidden with `visibility`, not `display`,
   and the box is given its size here. */

.MuiDrawer-paper .MuiListItemButton-root .MuiListItemIcon-root {
  width: 14px !important;
  height: 14px !important;
  flex: none !important;
}

/* every slot we have a WhatsIQ icon for */
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M4 13h6c.55 0 1-"]) > svg,
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M19 0H5c-.55 0-1"]) > svg,
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M17 11h3c1.11 0 "]) > svg,
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="m10.92 12.75 1.0"]) > svg,
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M19 10c1.13 0 2."]) > svg,
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M18 16.08c-.76 0"]) > svg,
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M11.4 1.02C6.62 "]) > svg,
.MuiDrawer-paper .MuiList-root > :nth-child(11) .MuiListItemIcon-root:has(> svg > path[d^="M19 3H5c-1.1 0-2"]) > svg,
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="m21.68 9.71-3.72"]) > svg,
.MuiDrawer-paper .MuiList-root > :nth-child(14) .MuiListItemIcon-root:has(> svg > path[d^="M16.75 13.96c.25"]) > svg,
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M20 2H4c-1.1 0-2"]) > svg,
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M20 4H4c-1.1 0-1"]) > svg,
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M9.78 18.65l.28-"]) > svg,
.MuiDrawer-paper .MuiList-root > :nth-child(18) .MuiListItemIcon-root:has(> svg > path[d^="M16.75 13.96c.25"]) > svg,
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M12 19c-1.1 0-2 "]) > svg,
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M12.88 5.05c3.18"]) > svg,
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M18 6h-2c0-2.21-"]) > svg,
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M18 12c0 .55.45 "]) > svg,
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M21 12.22C21 6.7"]) > svg,
.MuiDrawer-paper .MuiList-root > :nth-child(28) .MuiListItemIcon-root:has(> svg > path[d^="M19 3H5c-1.1 0-2"]) > svg,
.MuiDrawer-paper .MuiInputAdornment-root:has(> svg > path[d^="M15.5 14h-.79l-."]) > svg,
.MuiDrawer-paper .MuiIconButton-root:has(> svg > path[d^="M5 5h6c.55 0 1-."]) > svg {
  visibility: hidden !important;
}

  /* Overview */
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M4 13h6c.55 0 1-"]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h7v7H3zM14 3h7v7h-7zM3 14h7v7H3zM14 14h7v7h-7z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h7v7H3zM14 3h7v7h-7zM3 14h7v7H3zM14 14h7v7h-7z'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* Phone Book */
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M19 0H5c-.55 0-1"]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2zM22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2zM22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* Automation Flows */
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M17 11h3c1.11 0 "]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3v12M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM18 9a9 9 0 0 1-9 9'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3v12M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM18 9a9 9 0 0 1-9 9'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* My Plan */
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="m10.92 12.75 1.0"]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* Messaging Channels */
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M19 10c1.13 0 2."]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.7 1.7M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.7 1.7M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* Social Channels */
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M18 16.08c-.76 0"]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 2h10a5 5 0 0 1 5 5v10a5 5 0 0 1-5 5H7a5 5 0 0 1-5-5V7a5 5 0 0 1 5-5zM16 11.4A4 4 0 1 1 12.6 8a4 4 0 0 1 3.4 3.4zM17.5 6.5h.01'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 2h10a5 5 0 0 1 5 5v10a5 5 0 0 1-5 5H7a5 5 0 0 1-5-5V7a5 5 0 0 1 5-5zM16 11.4A4 4 0 1 1 12.6 8a4 4 0 0 1 3.4 3.4zM17.5 6.5h.01'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* Voice Channels */
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M11.4 1.02C6.62 "]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* Universal Inbox — shares a glyph with another entry, so keyed on its place in the list */
.MuiDrawer-paper .MuiList-root > :nth-child(11) .MuiListItemIcon-root:has(> svg > path[d^="M19 3H5c-1.1 0-2"]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* WhatsApp Forms */
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="m21.68 9.71-3.72"]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zM14 2v6h6M8 13h8M8 17h5'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zM14 2v6h6M8 13h8M8 17h5'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* WhatsApp — shares a glyph with another entry, so keyed on its place in the list */
.MuiDrawer-paper .MuiList-root > :nth-child(14) .MuiListItemIcon-root:has(> svg > path[d^="M16.75 13.96c.25"]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.9 20A9 9 0 1 0 4 16.1L2 22z M9.4 9.1c0 3 2.5 5.5 5.5 5.5.5 0 .9-.4.9-.9v-1.1l-1.9-.8-.8.8a4.8 4.8 0 0 1-1.7-1.7l.8-.8-.8-1.9h-1.1c-.5 0-.9.4-.9.9z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.9 20A9 9 0 1 0 4 16.1L2 22z M9.4 9.1c0 3 2.5 5.5 5.5 5.5.5 0 .9-.4.9-.9v-1.1l-1.9-.8-.8.8a4.8 4.8 0 0 1-1.7-1.7l.8-.8-.8-1.9h-1.1c-.5 0-.9.4-.9.9z'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* SMS */
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M20 2H4c-1.1 0-2"]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2C6.5 2 2 6.1 2 11.2c0 2.9 1.4 5.4 3.7 7.1V22l3.4-1.9c.9.3 1.9.4 2.9.4 5.5 0 10-4.1 10-9.2S17.5 2 12 2zM7 13.5l3-3.2 2.6 2.4L17 9'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2C6.5 2 2 6.1 2 11.2c0 2.9 1.4 5.4 3.7 7.1V22l3.4-1.9c.9.3 1.9.4 2.9.4 5.5 0 10-4.1 10-9.2S17.5 2 12 2zM7 13.5l3-3.2 2.6 2.4L17 9'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* Email */
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M20 4H4c-1.1 0-1"]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zM22 6l-10 7L2 6'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zM22 6l-10 7L2 6'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* Telegram */
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M9.78 18.65l.28-"]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3 2 11l7 2.5M22 3l-4 18-9-7.5M22 3 9 13.5V20l3.5-3.5'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3 2 11l7 2.5M22 3l-4 18-9-7.5M22 3 9 13.5V20l3.5-3.5'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* WhatsApp QR — shares a glyph with another entry, so keyed on its place in the list */
.MuiDrawer-paper .MuiList-root > :nth-child(18) .MuiListItemIcon-root:has(> svg > path[d^="M16.75 13.96c.25"]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h7v7H3zM14 3h7v7h-7zM3 14h7v7H3zM14 14h3v3h-3zM20 14v.01M14 20h.01M17 20h4v-3'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h7v7H3zM14 3h7v7h-7zM3 14h7v7H3zM14 14h3v3h-3zM20 14v.01M14 20h.01M17 20h4v-3'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* Voice Dialers */
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M12 19c-1.1 0-2 "]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6M21 3l-7 7M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6M21 3l-7 7M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* WhatsApp Call Logs */
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M12.88 5.05c3.18"]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20zM12 6v6l4 2'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20zM12 6v6l4 2'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* WhatsApp Orders */
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M18 6h-2c0-2.21-"]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l1.5-6h15L21 9M3 9v11h18V9M3 9h18M9 20v-6h6v6'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l1.5-6h15L21 9M3 9v11h18V9M3 9h18M9 20v-6h6v6'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* Twilio Campaign */
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M18 12c0 .55.45 "]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11v2a1 1 0 0 0 1 1h3l5 4V6L7 10H4a1 1 0 0 0-1 1zM16 9a3 3 0 0 1 0 6M19 6a7 7 0 0 1 0 12'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11v2a1 1 0 0 0 1 1h3l5 4V6L7 10H4a1 1 0 0 0-1 1zM16 9a3 3 0 0 1 0 6M19 6a7 7 0 0 1 0 12'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* Manage Agents */
.MuiDrawer-paper .MuiListItemIcon-root:has(> svg > path[d^="M21 12.22C21 6.7"]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* Agent Reports — shares a glyph with another entry, so keyed on its place in the list */
.MuiDrawer-paper .MuiList-root > :nth-child(28) .MuiListItemIcon-root:has(> svg > path[d^="M19 3H5c-1.1 0-2"]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20V2H6.5A2.5 2.5 0 0 0 4 4.5v15zM20 17v5H6.5a2.5 2.5 0 0 1 0-5'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20V2H6.5A2.5 2.5 0 0 0 4 4.5v15zM20 17v5H6.5a2.5 2.5 0 0 1 0-5'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* the menu search box */
.MuiDrawer-paper .MuiInputAdornment-root:has(> svg > path[d^="M15.5 14h-.79l-."]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16zM21 21l-4.35-4.35'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16zM21 21l-4.35-4.35'/%3E%3C/svg%3E") no-repeat center / contain;
}

  /* sign out, in the drawer footer */
.MuiDrawer-paper .MuiIconButton-root:has(> svg > path[d^="M5 5h6c.55 0 1-."]) {
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* =================================================================
   11. Chat Info — a docked column, not a sheet over the inbox
   -----------------------------------------------------------------
   aioCRM renders Chat Info two different ways. At 1536px and wider it
   is a permanent third column beside the thread, which is what WhatsIQ
   does. Narrower than that it switches to a temporary right-hand
   Drawer: a 340px sheet that floats over the conversation behind a
   rgba(28,42,39,.32) scrim, with body scrolling locked.

   Which variant React mounts is not something a stylesheet decides, so
   the narrow one is made to behave like the wide one instead:

     - the scrim goes transparent, so the conversation stays readable;
     - the sheet goes flat and flush, with one hairline down its edge;
     - the thread is given 340px of right padding while the panel is
       mounted, so the panel sits BESIDE the conversation instead of
       on top of it.

   The width is no longer hard-coded: custom/public/wiq-tweaks.js
   measures the paper and publishes it as --wiq-info-w, because the
   vendor sets it per breakpoint (300px at one, 340px at another) and a
   fixed number leaves a gap at the others.

   WHAT IS NOT CHANGED, AND WHY. Underneath, this is still a modal: MUI
   locks focus into it and marks the app root aria-hidden, both in
   JavaScript, where a stylesheet cannot reach. Making the backdrop
   transparent AND click-through was tried and rejected — the
   conversation then LOOKED live while MUI's focus trap quietly threw
   away every keystroke, which is a control that cannot act pretending
   it can. So the backdrop keeps its click: the conversation beside the
   panel is readable, and the first click on it closes the panel, the
   same as before. A genuinely live third column needs vendor source.
   ================================================================= */

/* The scrim goes transparent AND stops taking the pointer, so a click on
   the conversation reaches the conversation instead of dismissing the
   panel. That is only safe because custom/public/wiq-tweaks.js also holds
   MUI's focus trap off the app while the panel is open — without it the
   composer would focus and then swallow every keystroke. If that script is
   ever removed, put `pointer-events` back to auto here. */
.MuiDrawer-modal:has(> .MuiPaper-root.MuiDrawer-paperAnchorRight) {
  pointer-events: none !important;
}
.MuiDrawer-modal:has(> .MuiPaper-root.MuiDrawer-paperAnchorRight)
  > .MuiBackdrop-root {
  background-color: transparent !important;
  pointer-events: none !important;
}

/* the sheet reads as a column: flat, flush, one hairline down its edge */
.MuiDrawer-modal > .MuiPaper-root.MuiDrawer-paperAnchorRight {
  pointer-events: auto !important;
  box-shadow: none !important;
  border-left: 1px solid var(--wiq-border) !important;
  border-radius: 0 !important;
  background: var(--wiq-sheet) !important;
}

/* and the conversation makes room for it rather than hiding under it */
body:has(.MuiDrawer-modal > .MuiPaper-root.MuiDrawer-paperAnchorRight)
  main > .MuiBox-root > section:nth-of-type(2) {
  padding-right: var(--wiq-info-w, 340px) !important;
}
main > .MuiBox-root > section:nth-of-type(2) {
  transition: padding-right 225ms cubic-bezier(0, 0, 0.2, 1);
}

/* The notice strip above the conversation is a sibling of that box, not a
   child of it, so the padding above misses it entirely: it still runs the
   full width of main and its button sits under the panel. Clicking the
   button then does nothing, because the Drawer's paper is on top at
   z-index 1200 - which is how "Enable notifications" became unreachable
   the moment Chat Info was open.

   Matched on its own shape (icon, sentence, action, dismiss) rather than
   on an emotion hash. Verified: that selector matches exactly one element
   on the inbox. At 1536px and wider Chat Info is a real column and the
   button is reachable already, so the rule is tied to the Drawer being
   mounted, like the one above it. */
body:has(.MuiDrawer-modal > .MuiPaper-root.MuiDrawer-paperAnchorRight)
  main > .MuiBox-root:has(> svg + p + button + button) {
  padding-right: calc(var(--wiq-info-w, 340px) + 12px) !important;
}
main > .MuiBox-root:has(> svg + p + button + button) {
  /* This is the "enable browser notifications" prompt, and it is rendered
     above the page content on EVERY panel route, not only the inbox.

     It used to be zeroed here unconditionally: on the inbox that is right -
     the prompt sits directly on top of the two panes and a gap left a band
     of page background between them, so it read as something floating above
     the inbox rather than part of its chrome. On every other page the next
     thing down is the page heading ("Overview / Your team at a glance"),
     and flush meant the prompt and the heading touched.

     So the vendor's own 16px is restored by default and the flush variant
     is scoped to the one case it was written for: the next sibling is the
     inbox, which is the only child of main built out of <section>s. */
  margin-bottom: 16px !important;
  transition: padding-right 225ms cubic-bezier(0, 0, 0.2, 1);
}
/* The inbox is the one child of main built out of <section>s. Note the
   shape of this selector: `:has()` may NOT contain another `:has()` - the
   whole rule is then invalid and silently never matches, which is how the
   first attempt at this failed. A child combinator inside `:has()` is fine. */
main > .MuiBox-root:has(> svg + p + button + button):has(
    + .MuiBox-root > section
  ) {
  margin-bottom: 0 !important;
}

/* =================================================================
   12. Row labels start flush
   -----------------------------------------------------------------
   The third line of a conversation row is a Stack, and a Stack spaces
   its children with `margin-left` on everything after the first:

     .mui-nnodl8 > :not(style) ~ :not(style) { margin-left: 4.5px }

   The first child of that line is the "WhatsApp · <account>" text,
   which 8.9 hides — so the first VISIBLE label inherits that 4.5px and
   sits a notch right of the name and preview above it. The gap is put
   on the right instead: the first label starts flush with the column,
   and labels still separate from each other.
   ================================================================= */

main .MuiListItemButton-root:has(> .MuiBox-root > .MuiAvatar-root)
  > .MuiBox-root:nth-child(2) > .MuiStack-root:nth-child(3) > * {
  margin-left: 0 !important;
  margin-right: 4.5px !important;
}

/* =================================================================
   13. Chat Info — the panel's own contents
   -----------------------------------------------------------------
   Values from WhatsIQ's info column (app shell, lines 651-676):

     .info        border-left 1px --border; padding 18px 18px 24px
     .ihead       flex row, gap 12, padding-bottom 16, --border rule
     .ihead .av   44px, 15px
     .ihead b     600 16/22 Spline Sans
     .ihead small 13px --muted
     .isec        padding 16px 0; --border rule; last has none
     .isec h3     500 12/16 Inter, --faint, flex space-between
     .isec h3 a   --muted, --text on hover
     .win .big    500 22/28, tabular-nums, letter-spacing -.01em
     .win .wbar   6px, radius 3, track --rule, fill --chart-1
     .win p       12/17 --muted
     .labels btn  26px, pad 0 10, radius 13, 12px/500
       [pressed]  background --text, white — which is what aioCRM
                  already paints its labels, so only the geometry moves
     .note        min-height 64, 1px --border, radius 8, 8px 10, 13/19
     .btn.sec     32px, 0 14, radius 8, 13px/500, 1px --control, #fff

   THE HOOK, and why it is shaped like that. aioCRM renders this panel
   two ways — a right Drawer under 1536px, a plain Box as main's third
   child above it (see section 11) — so a selector on the Drawer would
   have styled only the narrow one. Both share their innards, so the
   hook is the content instead: the info BODY is the only Box whose
   first Stack child is an Avatar followed IMMEDIATELY by a paragraph.
   The chat header's Stack is Avatar + Box, and a list row's avatar is
   nested in a Box, so neither can match.

   WHAT STAYS DIFFERENT. WhatsIQ's column opens with a Channel / First
   message / Messages key-value list, then carries a Deal selector,
   five renameable attributes, a shared-files list and a four-bar
   activity summary. aioCRM has none of those, and has an hours /
   minutes / seconds countdown and an event timeline that WhatsIQ does
   not. That is data, not styling. The countdown is kept and quietened
   rather than hidden — it is the same fact as WhatsIQ's big "Closed",
   counted down instead of up.
   ================================================================= */

/* --- 13.1 the identity block ------------------------------------- */
/* aioCRM stacks avatar, name, number, channel and button in one
   centred column. WhatsIQ sets the avatar beside the name with the
   number under it, all left-aligned, so the column is re-laid as a
   grid — the children keep their order in the markup. */
.MuiStack-root:has(> .MuiAvatar-root + p.MuiTypography-root):has(> .MuiButton-root) {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) !important;
  column-gap: 12px !important;
  row-gap: 0 !important;
  align-items: center !important;
  justify-items: start !important;
  padding: 18px 18px 16px !important;
  border-bottom: 1px solid var(--wiq-border) !important;
}
.MuiStack-root:has(> .MuiAvatar-root + p.MuiTypography-root):has(> .MuiButton-root)
  > .MuiAvatar-root {
  grid-area: 1 / 1 / 3 / 2 !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: hsl(152 55% 88%) !important;
  color: #1d231d !important;
  border: 0 !important;
  font-family: var(--wiq-font) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  align-self: center !important;
}
/* the name */
.MuiStack-root:has(> .MuiAvatar-root + p.MuiTypography-root):has(> .MuiButton-root)
  > p.MuiTypography-root:nth-of-type(1) {
  grid-area: 1 / 2 / 2 / 3 !important;
  align-self: end !important;
  text-align: left !important;
  font-family: var(--wiq-head) !important;
  font-size: 16px !important;
  line-height: 22px !important;
  font-weight: 600 !important;
  color: var(--wiq-text) !important;
}
/* the number */
.MuiStack-root:has(> .MuiAvatar-root + p.MuiTypography-root):has(> .MuiButton-root)
  > p.MuiTypography-root:nth-of-type(2) {
  grid-area: 2 / 2 / 3 / 3 !important;
  align-self: start !important;
  text-align: left !important;
  font-size: 13px !important;
  line-height: 18px !important;
  color: var(--wiq-muted) !important;
}
/* the channel line */
.MuiStack-root:has(> .MuiAvatar-root + p.MuiTypography-root):has(> .MuiButton-root)
  > .MuiStack-root {
  grid-area: 3 / 1 / 4 / 3 !important;
  margin-top: 12px !important;
  padding-top: 0 !important;
}
.MuiStack-root:has(> .MuiAvatar-root + p.MuiTypography-root):has(> .MuiButton-root)
  > .MuiStack-root p.MuiTypography-root {
  font-size: 12px !important;
  line-height: 17px !important;
  color: var(--wiq-faint) !important;
}
/* Save as Contact — WhatsIQ's .btn.sec, left-aligned, its own width */
.MuiStack-root:has(> .MuiAvatar-root + p.MuiTypography-root):has(> .MuiButton-root)
  > .MuiButton-root {
  grid-area: 4 / 1 / 5 / 3 !important;
  justify-self: start !important;
  margin-top: 14px !important;
  height: 32px !important;
  padding: 0 14px !important;
  border-radius: var(--wiq-r-ctl) !important;
  border: 1px solid var(--wiq-control) !important;
  background: var(--wiq-sheet) !important;
  color: var(--wiq-text) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

/* --- 13.2 the sections ------------------------------------------- */
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root {
  padding: 16px 18px !important;
  border-bottom: 1px solid var(--wiq-border) !important;
}
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root:last-child {
  border-bottom: 0 !important;
  padding-bottom: 24px !important;
}

/* the caption row — WhatsIQ's .isec h3 */
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root > .MuiStack-root:first-child {
  align-items: center !important;
  margin-bottom: 8px !important;
}
/* The caption text is ALL CAPS in the markup, where WhatsIQ writes it
   in sentence case. Lower-casing it and raising the first letter gets
   there without touching the DOM — at the cost that an acronym in a
   future caption would come out as a word. */
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root > .MuiStack-root > p.MuiTypography-root:first-child {
  font-family: var(--wiq-font) !important;
  font-size: 12px !important;
  line-height: 16px !important;
  font-weight: 500 !important;
  letter-spacing: normal !important;
  color: var(--wiq-faint) !important;
  text-transform: lowercase !important;
}
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root > .MuiStack-root > p.MuiTypography-root:first-child::first-letter {
  text-transform: uppercase !important;
}

/* "Manage Labels" and friends — WhatsIQ sets these as quiet underlined
   links in the caption row, not as buttons */
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root > .MuiStack-root > .MuiButton-root {
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  font-size: 12px !important;
  line-height: 16px !important;
  font-weight: 400 !important;
  color: var(--wiq-muted) !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
  text-decoration-color: var(--wiq-control) !important;
}
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root > .MuiStack-root > .MuiButton-root:hover {
  background: transparent !important;
  color: var(--wiq-text) !important;
  text-decoration-color: var(--wiq-text) !important;
}

/* the lines under a caption: the explanation, and the status line that
   follows the bar. Size only — the status line is green while the
   window is open and red once it has closed, and that colour is the
   state, not decoration. */
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root > p.MuiTypography-root {
  font-size: 12px !important;
  line-height: 17px !important;
}

/* --- 13.3 the reply-window countdown ----------------------------- */
/* WhatsIQ states the window once, large. aioCRM counts it down in
   three tiles; they are kept — same fact, more detail — and set in
   WhatsIQ's numeral style. */
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root > .MuiStack-root > .MuiBox-root {
  background: var(--wiq-raised) !important;
  border: 1px solid var(--wiq-border) !important;
  border-radius: var(--wiq-r-ctl) !important;
  padding: 7px !important;
}
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root > .MuiStack-root > .MuiBox-root > p.MuiTypography-root:first-child {
  font-size: 22px !important;
  line-height: 28px !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em !important;
  font-variant-numeric: tabular-nums !important;
  color: var(--wiq-text) !important;
  text-transform: none !important;
}
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root > .MuiStack-root > .MuiBox-root > p.MuiTypography-root:last-child {
  font-size: 10px !important;
  line-height: 14px !important;
  color: var(--wiq-faint) !important;
}

/* the bar. Only the success variant is re-coloured — a closed or
   expiring window is painted by another variant, and that colour is
   the state, not decoration. */
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  .MuiLinearProgress-root {
  height: 6px !important;
  border-radius: 3px !important;
  background: var(--wiq-rule) !important;
  margin: 10px 0 8px !important;
}
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  .MuiLinearProgress-barColorSuccess {
  background: var(--wiq-accent) !important;
  border-radius: 3px !important;
}

/* --- 13.4 labels ------------------------------------------------- */
/* Geometry only, for the same reason as the row labels above: the hue
   is the label's, and it has to read the same here as it does in the
   list and in the tag picker. */
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  .MuiChip-root {
  height: 26px !important;
  border-radius: 13px !important;
}
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  .MuiChip-label {
  padding: 0 10px !important;
  font-size: 12px !important;
  line-height: 24px !important;
  font-weight: 500 !important;
}

/* --- 13.5 the note ----------------------------------------------- */
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  .MuiOutlinedInput-root {
  background: var(--wiq-sheet) !important;
  border-radius: var(--wiq-r-ctl) !important;
  padding: 8px 10px !important;
  font-size: 13px !important;
  line-height: 19px !important;
}
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  .MuiOutlinedInput-notchedOutline {
  border-color: var(--wiq-border) !important;
}

/* --- 13.6 the sheet header --------------------------------------- */
/* WhatsIQ's column has no title bar, because it is docked and cannot
   be dismissed. Here it carries the only close control, so it stays —
   set as a sheet header rather than a body line. */
.MuiBox-root:has(> .MuiStack-root + .MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root))
  > .MuiStack-root:first-child {
  border-bottom: 1px solid var(--wiq-border) !important;
  padding: 0 14px 0 18px !important;
  min-height: 56px !important;
}
.MuiBox-root:has(> .MuiStack-root + .MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root))
  > .MuiStack-root:first-child > p.MuiTypography-root {
  font-family: var(--wiq-head) !important;
  font-size: 15px !important;
  line-height: 22px !important;
  font-weight: 600 !important;
  color: var(--wiq-text) !important;
}

/* =================================================================
   14. The reply window, as one clock
   -----------------------------------------------------------------
   WhatsIQ states the window as a single line — "Reply window" then
   23:57:06 at `.win .big` (500 22/28, tabular, -.01em), the bar, then
   the explanation under it. aioCRM splits the same number into three
   filled tiles with HRS / MIN / SEC captions and puts its explanation
   above them.

   The three tiles are run together into one clock: each tile loses its
   fill, border and padding, its unit caption is hidden, and a colon is
   drawn between them. Nothing is removed — the hours, minutes and
   seconds are all still on screen, just read as one number. The
   section is then re-ordered so the explanation follows the bar
   instead of leading the block.
   ================================================================= */

/* caption · clock · bar · status · explanation */
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root:has(.MuiLinearProgress-root) {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root:has(.MuiLinearProgress-root) > .MuiStack-root:first-child { order: 0 !important; }
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root:has(.MuiLinearProgress-root) > .MuiStack-root:not(:first-child) { order: 1 !important; }
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root:has(.MuiLinearProgress-root) > .MuiLinearProgress-root { order: 2 !important; }
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root:has(.MuiLinearProgress-root) > p.MuiTypography-root:nth-of-type(2) { order: 3 !important; }
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root:has(.MuiLinearProgress-root) > p.MuiTypography-root:nth-of-type(1) {
  order: 4 !important;
  margin-top: 6px !important;
}

/* the three tiles become one clock */
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root:has(.MuiLinearProgress-root) > .MuiStack-root:not(:first-child) {
  display: flex !important;
  gap: 0 !important;
  align-items: baseline !important;
  justify-content: flex-start !important;
}
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root:has(.MuiLinearProgress-root) > .MuiStack-root:not(:first-child) > .MuiBox-root {
  display: flex !important;
  align-items: baseline !important;
  flex: none !important;
  width: auto !important;
  /* the Stack spaces its children with margin-left, which `gap:0`
     cannot undo — same trap as the row labels in section 12 */
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
}
/* HRS / MIN / SEC — the colons say the same thing in less room */
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root:has(.MuiLinearProgress-root) > .MuiStack-root:not(:first-child)
  > .MuiBox-root > p.MuiTypography-root:last-child {
  display: none !important;
}
.MuiBox-root:has(> .MuiStack-root > .MuiAvatar-root + p.MuiTypography-root)
  > .MuiBox-root:has(.MuiLinearProgress-root) > .MuiStack-root:not(:first-child)
  > .MuiBox-root:not(:last-child)::after {
  content: ":";
  font-family: var(--wiq-font);
  font-size: 22px;
  line-height: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--wiq-text);
}

/* =================================================================
   15. The WhatsIQ mark in the sidebar
   -----------------------------------------------------------------
   The vendor draws its own tile as a teal square with a filled person
   glyph. The glyph is hidden rather than removed — the tile keeps its
   size that way — and the WhatsIQ mark is laid over it. The file is in
   custom/public/brand/, so a vendor release cannot take it back.

   Keyed on the glyph's own path data, like the nav icons in section 10:
   if a release changes the mark, this rule stops matching and the
   vendor's tile comes back rather than something breaking.
   ================================================================= */
.MuiDrawer-paper .MuiBox-root:has(> svg > path[d^="M12 12c2.21 0 4-1.79"]) {
  background: #ffffff url("/custom/brand/icon-192.png") center / contain no-repeat !important;
  border-radius: 10px !important;
}
.MuiDrawer-paper .MuiBox-root:has(> svg > path[d^="M12 12c2.21 0 4-1.79"]) > svg {
  visibility: hidden !important;
}

/* =================================================================
   16. The WhatsApp Call Logs table, filled in
   -----------------------------------------------------------------
   Section 8 of wiq-tweaks.js adds four things the vendor's own query
   cannot supply: the phone number behind a WhatsApp user id, the
   number behind an account name, our three recordings, and the
   model's transcript. Everything here is ours; the vendor paints
   none of it, so nothing below needs !important.
   ================================================================= */

/* --- 16.1 the numbers under a cell ------------------------------- */
[data-wiq="ctphone"],
[data-wiq="acphone"] {
  font-size: 12px;
  line-height: 1.5;
  color: var(--wiq-faint, #666c66);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

/* --- 16.2 three recordings, one player --------------------------- */
[data-wiq="rec3"] {
  display: block;
  margin-bottom: 8px;
  min-width: 232px;
}
[data-wiq="rec3tabs"] {
  display: inline-flex;
  border: 1px solid var(--wiq-border, #e6e9e5);
  border-radius: var(--wiq-r-ctl, 8px);
  overflow: hidden;
  background: var(--wiq-raised, #f7f8f6);
  margin-bottom: 5px;
}
[data-wiq="rec3tabs"] button {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  padding: 6px 10px;
  color: var(--wiq-muted, #575d57);
  border-right: 1px solid var(--wiq-border, #e6e9e5);
}
[data-wiq="rec3tabs"] button:last-child { border-right: 0; }
[data-wiq="rec3tabs"] button:hover { background: var(--wiq-hover, #e9ede8); }
[data-wiq="rec3tabs"] button[data-active] {
  background: var(--wiq-accent, #13804f);
  color: #fff;
}
[data-wiq="rec3"] audio {
  display: block;
  height: 32px;
  width: 232px;
}
[data-wiq="rec3"] > a,
[data-wiq="recplay"] a {
  display: inline-block;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--wiq-faint, #666c66);
}

/* --- 16.3 Meta's own recording, when it was asked for ------------- */
[data-wiq="recplay"] { display: block; margin-top: 8px; }
[data-wiq="recplay"] > span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--wiq-faint, #666c66);
  margin-bottom: 3px;
}
[data-wiq="recplay"] audio { height: 32px; width: 232px; display: block; }

/* --- 16.4 the way into the transcript ---------------------------- */
button[data-wiq="aitxbtn"] {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--wiq-accent, #13804f);
  display: inline-block;
  margin-top: 2px;
}
button[data-wiq="aitxbtn"]::before { content: "\203A  "; }
button[data-wiq="aitxbtn"]:hover { text-decoration: underline; }

/* --- 16.5 the transcript pane ------------------------------------
   Above the vendor's own drawers, which sit at 1200. */
[data-wiq="txback"] {
  position: fixed;
  inset: 0;
  background: rgba(14, 18, 15, .32);
  z-index: 1390;
  animation: wiq-fade .14s ease-out;
}
[data-wiq="txpane"] {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(430px, 100vw);
  z-index: 1400;
  background: var(--wiq-sheet, #fff);
  border-left: 1px solid var(--wiq-border, #e6e9e5);
  box-shadow: -18px 0 48px rgba(16, 24, 18, .16);
  display: flex;
  flex-direction: column;
  animation: wiq-slide .18s cubic-bezier(.22, .61, .36, 1);
}
@keyframes wiq-fade { from { opacity: 0; } }
@keyframes wiq-slide { from { transform: translateX(26px); opacity: .4; } }

[data-wiq="txpane"] > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--wiq-border, #e6e9e5);
}
[data-wiq="txpane"] > header strong {
  display: block;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--wiq-text, #141714);
  line-height: 1.35;
}
[data-wiq="txpane"] > header span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--wiq-faint, #666c66);
}
[data-wiq="txpane"] > header button {
  appearance: none;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--wiq-muted, #575d57);
  background: var(--wiq-raised, #f7f8f6);
  border: 1px solid var(--wiq-border, #e6e9e5);
  border-radius: var(--wiq-r-ctl, 8px);
  padding: 6px 12px;
  flex: none;
}
[data-wiq="txpane"] > header button:hover {
  background: var(--wiq-hover, #e9ede8);
  color: var(--wiq-text, #141714);
}

[data-wiq="txbody"] {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 28px;
}
[data-wiq="txbody"] > audio {
  width: 100%;
  height: 34px;
  margin-bottom: 16px;
}
[data-wiq="txbody"] ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
[data-wiq="txbody"] li { margin-bottom: 14px; }
[data-wiq="txbody"] li > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}
[data-wiq="txbody"] li b {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--wiq-accent, #13804f);
}
[data-wiq="txbody"] li[data-speaker="caller"] b { color: var(--wiq-muted, #575d57); }
[data-wiq="txbody"] li > div > span {
  font-size: 11px;
  color: var(--wiq-faint, #666c66);
  font-variant-numeric: tabular-nums;
}
[data-wiq="txbody"] li p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--wiq-text, #141714);
  background: var(--wiq-raised, #f7f8f6);
  border: 1px solid var(--wiq-border, #e6e9e5);
  border-radius: var(--wiq-r-card, 12px);
  padding: 9px 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
[data-wiq="txbody"] li[data-speaker="ai"] p {
  background: var(--wiq-accent-soft, #e3f3ea);
  border-color: transparent;
}

/* --- 16.6 the note on the vendor's recording switch -------------- */
p[data-wiq="recnote"] {
  margin: 10px 0 0 !important;
  font-size: 12.5px !important;
  line-height: 1.55 !important;
  color: var(--wiq-faint, #666c66) !important;
}
p[data-wiq="recnote"] a {
  color: var(--wiq-accent, #13804f) !important;
  font-weight: 600;
}

/* =================================================================
   17. The regrouped menu
   -----------------------------------------------------------------
   Section 9 of wiq-tweaks.js lays the nav list out as a flex column
   and gives every child an `order` — nothing is moved in the DOM,
   because re-parenting a child of a React-owned list is how the
   panel goes white. All that is left for CSS is the unread badge.
   ================================================================= */
.MuiDrawer-paper [data-wiq="navbadge"] {
  display: inline-block;
  margin-left: 8px;
  min-width: 19px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--wiq-accent, #13804f);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

/* My Plan sits below every group with no heading of its own, so it needs a
   rule to stop it reading as the last item of TEAM. */
.MuiDrawer-paper [data-wiq-nav="My Plan"] {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--wiq-border, #e6e9e5);
}

/* The recordings at the top of the transcript pane (section 8). */
[data-wiq="txrecs"] { margin-bottom: 18px; }
[data-wiq="txrecs"] > div {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
[data-wiq="txrecs"] span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--wiq-faint, #666c66);
  width: 66px;
  flex: none;
}
[data-wiq="txrecs"] audio { height: 32px; flex: 1; min-width: 0; }

/* The WhatsApp id in the Contact Info panel (section 11 of wiq-tweaks.js) —
   moved here out of the Call Logs table, where a phone number belongs. */
/* The row is appended into a GRID (the panel's detail stack), so without
   `grid-column` it becomes one narrow grid item - measured at 65px wide,
   which broke a 19-character id across four lines. Full width, and the
   label above the value rather than beside it: side by side there is not
   room for both in a 230px panel. */
[data-wiq="waid"] {
  display: block;
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 10px;
}
[data-wiq="waid"] > span {
  display: block;
  margin-bottom: 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--wiq-faint, #666c66);
}
[data-wiq="waid"] > code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--wiq-muted, #575d57);
  background: var(--wiq-raised, #f7f8f6);
  border: 1px solid var(--wiq-border, #e6e9e5);
  border-radius: 6px;
  padding: 5px 8px;
  /* It is an identifier people paste into Meta's tooling, so one click
     selects the whole thing; and it wraps at the edge rather than
     overflowing, for the longer ids some channels hand out. */
  user-select: all;
  overflow-wrap: anywhere;
}

/* =================================================================
   16. The subscription notice
   -----------------------------------------------------------------
   Drawn by section 12 of wiq-tweaks.js on My Plan, and inside the
   vendor's "inbox not available" card when a renewal has failed.
   Tones match the rest of the panel: ok is the accent wash, warn is
   amber, bad is the negative wash. Nothing here is a lock - the
   server closes the inbox; this explains why and offers the fix.
   ================================================================= */

[data-wiq="billing"] {
  border: 1px solid var(--wiq-border);
  border-radius: var(--wiq-r-card);
  background: var(--wiq-raised);
  padding: 14px 16px;
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--wiq-text);
}
[data-wiq="billing"][data-tone="ok"] {
  background: var(--wiq-accent-soft);
  border-color: transparent;
}
[data-wiq="billing"][data-tone="warn"] {
  background: #fdf3e0;
  border-color: transparent;
  color: #6f4a05;
}
[data-wiq="billing"][data-tone="bad"] {
  background: #fdeceb;
  border-color: transparent;
  color: #8f2420;
}

[data-wiq="billhead"] {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-bottom: 3px;
}
[data-wiq="billbody"] {
  margin: 0;
  font-size: 13.5px;
  /* The tone colour is the heading's; the body sits a shade back from it
     without losing the tone, which a flat muted grey would. */
  opacity: .88;
}

[data-wiq="billacts"] {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
[data-wiq="billacts"]:empty { display: none; }

[data-wiq="billbtn"] {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid var(--wiq-control);
  background: var(--wiq-sheet);
  color: var(--wiq-text);
  cursor: pointer;
}
[data-wiq="billbtn"]:hover { background: var(--wiq-hover); }
[data-wiq="billbtn"][data-kind="primary"] {
  background: var(--wiq-primary);
  border-color: var(--wiq-primary);
  color: #fff;
}
[data-wiq="billbtn"][data-kind="primary"]:hover { background: var(--wiq-primary-hover); }
[data-wiq="billbtn"]:disabled { opacity: .55; cursor: not-allowed; }

[data-wiq="billsay"] {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--wiq-accent);
}
[data-wiq="billsay"]:empty { display: none; }
[data-wiq="billsay"][data-bad="1"] { color: var(--wiq-negative); }

/* The action row lent to the vendor's "inbox not available" card: the card
   is centred, so the buttons are too, and they need air above the text
   they follow. (The full notice was tried here first and printed the same
   sentence twice - the card already says what happened.) */
[data-wiq="billacts"][data-where="inboxcard"] {
  justify-content: center;
  margin-top: 16px;
}
[data-wiq="billacts"][data-where="inboxcard"] + [data-wiq="billsay"] {
  text-align: center;
}

/* The second Embedded Signup route (section 13 of wiq-tweaks.js). Sized and
   shaped like the vendor's own small outlined card buttons so it does not
   read as something bolted on; it sits directly under "Connect with Meta". */
[data-wiq="esnew"] {
  display: block;
  width: 100%;
  margin-top: 6px;
  font: inherit;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--wiq-control);
  background: var(--wiq-sheet);
  color: var(--wiq-text);
  cursor: pointer;
}
[data-wiq="esnew"]:hover { background: var(--wiq-hover); }

/* The Embedded Signup notice (section 13 of wiq-tweaks.js). Shown only when
   Meta closed the popup without granting anything - the one case the
   vendor's callback handles by silently resetting. */
[data-wiq="esnote"] {
  border-radius: var(--wiq-r-card);
  background: #fdf3e0;
  color: #6f4a05;
  padding: 13px 16px;
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.55;
}
[data-wiq="esnote"]:empty { display: none; }

/* =================================================================
   17. The inbox stops running below the fold
   -----------------------------------------------------------------
   The vendor sizes the inbox panes as "viewport minus the top bar",
   and does not count the notification prompt it renders ABOVE them
   inside the same <main>. Measured at a 860px viewport:

       prompt showing   main 852px tall, 46px past the fold
       prompt dismissed main 806px tall, fits exactly

   46px is the prompt's own height. main is overflow-y: hidden, so
   the part below the fold - the composer, and the foot of the Chat
   Info column - simply cannot be reached.

   The sections carry a hard height (flex: 0 0 auto), so they are
   what has to give. Scoped to the case that is wrong: the pane row
   immediately after the prompt. With the prompt dismissed the
   vendor's own sizing is correct and nothing here applies.

   The two heights are named rather than hard-coded into the sum so
   that a change to either is a one-line edit; the prompt's height is
   set by our own rules in section 11 (6px padding, 32px button,
   1px border).
   ================================================================= */
:root {
  --wiq-topbar: 54px;
  --wiq-pushbar: 46px;
}
main > .MuiBox-root:has(> svg + p + button + button)
  + .MuiBox-root > section {
  height: calc(100vh - var(--wiq-topbar) - var(--wiq-pushbar)) !important;
}

/* The panes now end exactly at the fold, but main is `flex: 1 1 0%` in a
   parent whose own height came from the old, taller main - so it keeps
   growing to 852px and leaves a 46px empty tail that the page can scroll
   to. max-height beats flex-grow, so this caps main at the space that
   actually exists and the scrollbar goes away. */
main:has(> .MuiBox-root > svg + p + button + button) {
  max-height: calc(100vh - var(--wiq-topbar)) !important;
}

/* The direct coexistence connect (section 13b of wiq-tweaks.js). Same shape
   as the vendor's small card buttons; accent-tinted so it reads as the
   deliberate alternative route rather than a third equal option. */
[data-wiq="esdirect"] {
  display: block;
  width: 100%;
  margin-top: 6px;
  font: inherit;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--wiq-accent);
  background: var(--wiq-accent-soft);
  color: var(--wiq-accent);
  cursor: pointer;
}
[data-wiq="esdirect"]:hover { filter: brightness(.97); }
