/* Communication hub — scoped to #sec-communication. Stitch "Light & Gold" (Communications & Outbox Hub).
   Loaded after the inline block in index.html, so equal-specificity rules here win. */
#sec-communication { font-family: var(--sh-font); color: var(--sh-on-surface); padding-top: 24px; }
#sec-communication .btn { font-family: var(--sh-font); border-radius: 8px; font-weight: 600; }
#sec-communication .btn-sm { font-size: 12px; padding: 7px 12px; }
#sec-communication .btn-secondary { background: var(--sh-surface-lowest); color: var(--sh-on-surface); border: none; box-shadow: var(--sh-shadow); }
#sec-communication .btn-secondary:hover { background: var(--sh-surface-low); }
#sec-communication .btn-ghost { background: transparent; color: var(--sh-on-surface-variant); border: none; }
#sec-communication .btn-ghost:hover { background: var(--sh-surface-container); color: var(--sh-on-surface); }
#sec-communication .btn-gold, #sec-communication .btn-compose { background: var(--sh-primary-container); color: var(--sh-on-primary-container); border: none; font-weight: 700; box-shadow: 0 1px 4px rgba(133,83,0,.2); }
#sec-communication .btn-gold:hover, #sec-communication .btn-compose:hover { background: var(--sh-primary); color: var(--sh-on-primary); filter: none; }
#sec-communication .btn-compose { padding: 9px 16px; font-size: 13px; }
#sec-communication .btn-danger { background: var(--sh-error); color: #fff; border: none; }
#sec-communication .btn.tpl-open { background: var(--sh-surface-low); border: none; color: var(--sh-primary); }
#sec-communication .material-symbols-outlined { font-size: 18px; vertical-align: middle; }

/* Context strip + header */
#sec-communication .inbox-topbar { background: var(--sh-surface-lowest); box-shadow: var(--sh-shadow); border: none; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; min-height: 0; }
#sec-communication .inbox-kicker { font-size: 11px; font-weight: 700; color: var(--sh-on-surface-variant); letter-spacing: .06em; }
#sec-communication .inbox-top-title { font-size: 14px; font-weight: 700; color: var(--sh-on-surface); }
#sec-communication .topbar-meta > span:not(.sample-chip) { background: var(--sh-surface-low); padding: 5px 10px; border-radius: 8px; font-size: 11px; font-weight: 600; color: var(--sh-on-surface-variant); }
#sec-communication .sample-chip { background: var(--sh-surface-high); color: var(--sh-on-primary-container); border: none; font-weight: 700; }
#sec-communication .inbox-sample-btn { background: var(--sh-surface-low); border: none; color: var(--sh-on-surface); font-weight: 700; }
#sec-communication .inbox-sample-btn.on { background: var(--sh-primary-container); color: var(--sh-on-primary-container); }
#sec-communication .sec-title { font-size: 30px; line-height: 38px; font-weight: 700; letter-spacing: -.02em; }
#sec-communication .sec-sub { font-size: 14px; color: var(--sh-on-surface-variant); }

/* Channel switcher + folder tabs (segmented, like crm-subnav) */
#sec-communication .channel-switcher, #sec-communication .mailbox-tabs { background: var(--sh-surface-low); border: none; border-radius: 12px; padding: 4px; gap: 4px; }
#sec-communication .channel-switcher { margin-bottom: 24px; }
#sec-communication .channel-tab { border: none; border-radius: 8px; padding: 8px 14px; font-size: 12px; font-weight: 600; color: var(--sh-on-surface-variant); font-family: var(--sh-font); }
#sec-communication .channel-tab:hover { background: var(--sh-surface-container); color: var(--sh-on-surface); }
#sec-communication .channel-tab.active { background: var(--sh-surface-lowest); color: var(--sh-on-surface); font-weight: 700; box-shadow: var(--sh-shadow); }
#sec-communication .channel-tab .ch-ico { background: var(--sh-surface-container); color: var(--sh-primary); border-radius: 6px; }
#sec-communication .channel-tab.active .ch-ico { background: var(--sh-primary-container); color: var(--sh-on-primary-container); }
#sec-communication .ch-badge { background: var(--sh-error-container); color: var(--sh-error); font-weight: 700; }
#sec-communication .channel-tab.active .ch-badge { background: var(--sh-primary-container); color: var(--sh-on-primary-container); }
#sec-communication .ch-status { background: var(--sh-ok-bg); color: var(--sh-ok); border: none; font-weight: 700; }
#sec-communication .channel-tab.active .ch-status { background: var(--sh-ok-bg); color: var(--sh-ok); }
#sec-communication .ch-status.off, #sec-communication .channel-tab.active .ch-status.off { background: var(--sh-surface-container); color: var(--sh-on-surface-variant); }
#sec-communication .mailbox-tab { border-radius: 8px; padding: 7px 12px; font-size: 12px; font-weight: 600; color: var(--sh-on-surface-variant); font-family: var(--sh-font); }
#sec-communication .mailbox-tab:hover { background: var(--sh-surface-container); }
#sec-communication .mailbox-tab.active { background: var(--sh-surface-lowest); color: var(--sh-on-surface); font-weight: 700; box-shadow: var(--sh-shadow); }
#sec-communication .mailbox-tab .count { opacity: .8; }
#sec-communication .mailbox-tab.active .count { color: var(--sh-primary); }

/* KPIs */
#sec-communication .inbox-kpis { gap: 16px; margin-bottom: 24px; }
#sec-communication .kpi { position: relative; overflow: hidden; background: var(--sh-surface-lowest); border: none; border-radius: 12px; padding: 16px; box-shadow: var(--sh-shadow); }
#sec-communication .kpi::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--sh-surface-high); }
#sec-communication .kpi:first-child::before { background: var(--sh-primary-container); }
#sec-communication .kpi-lbl { font-size: 11px; font-weight: 700; color: var(--sh-on-surface-variant); letter-spacing: .06em; }
#sec-communication .kpi-val { font-size: 24px; line-height: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--sh-on-surface); margin-top: 8px; }
#sec-communication .kpi-val.sm { font-size: 14px; line-height: 20px; }
#sec-communication .kpi-note { color: var(--sh-on-surface-variant); }

/* Inbox card, toolbar, search */
#sec-communication .inbox-card, #sec-communication .card { background: var(--sh-surface-lowest); border: none; box-shadow: var(--sh-shadow); border-radius: 12px; }
#sec-communication .list-toolbar { background: var(--sh-surface-lowest); border-bottom: 1px solid var(--sh-surface-container); }
#sec-communication .filter-toggle { background: var(--sh-surface-low); border: none; color: var(--sh-on-surface); border-radius: 8px; font-weight: 600; font-family: var(--sh-font); }
#sec-communication .filter-toggle.on { background: var(--sh-primary-container); color: var(--sh-on-primary-container); }
#sec-communication .toggle-dot { border-color: var(--sh-outline); border-radius: 4px; }
#sec-communication .filter-toggle.on .toggle-dot { background: var(--sh-on-primary-container); border-color: var(--sh-on-primary-container); color: var(--sh-primary-container); }
#sec-communication .inbox-search input, #sec-communication .form-field input, #sec-communication .form-field select, #sec-communication .form-field textarea, #sec-communication .composer textarea { background: var(--sh-surface-low); border: 1px solid transparent; border-radius: 8px; color: var(--sh-on-surface); font-family: var(--sh-font); box-shadow: none; }
#sec-communication .inbox-search input:focus, #sec-communication .form-field input:focus, #sec-communication .form-field select:focus, #sec-communication .form-field textarea:focus, #sec-communication .composer textarea:focus { background: var(--sh-surface-lowest); border-color: var(--sh-primary-container); box-shadow: 0 0 0 3px rgba(245,158,11,.2); outline: none; }
#sec-communication .inbox-search .ico { color: var(--sh-outline); display: inline-flex; font-size: 18px; }
#sec-communication .inbox-search input { padding-left: 36px; }

/* Rail + thread rows */
#sec-communication .inbox-rail, #sec-communication .drafts-rail { background: var(--sh-surface-low); border-right: 1px solid var(--sh-surface-container); }
#sec-communication .inbox-rail-head, #sec-communication .inbox-filters, #sec-communication .drafts-rail-head { border-bottom: 1px solid var(--sh-surface-container); }
#sec-communication .thread-list, #sec-communication .inbox-list #inboxList { background: var(--sh-surface-lowest); }
#sec-communication .thread-row, #sec-communication .draft-row { background: var(--sh-surface-lowest); border-bottom: 1px solid var(--sh-surface-low); color: var(--sh-on-surface); }
#sec-communication .thread-row:hover, #sec-communication .draft-row:hover { background: var(--sh-surface-low); }
#sec-communication .thread-row.selected, #sec-communication .draft-row.selected { background: var(--sh-surface-low); box-shadow: inset 3px 0 0 var(--sh-primary-container); }
#sec-communication .thread-row.unread { background: var(--sh-surface-lowest); }
#sec-communication .thread-row.unread .thread-subject, #sec-communication .thread-row.unread .thread-from { font-weight: 800; }
#sec-communication .thread-from, #sec-communication .draft-subj { color: var(--sh-on-surface); font-weight: 700; }
#sec-communication .thread-subject { color: var(--sh-on-surface); font-weight: 600; }
#sec-communication .thread-snippet, #sec-communication .draft-to { color: var(--sh-on-surface-variant); }
#sec-communication .thread-time, #sec-communication .draft-time, #sec-communication .draft-count { color: var(--sh-outline); }
#sec-communication .unread-dot { background: var(--sh-primary-container); box-shadow: 0 0 0 3px rgba(245,158,11,.2); }
#sec-communication .draft-snip, #sec-communication .inbox-rail-empty { color: var(--sh-outline); }
#sec-communication .avatar { border-radius: 50%; background: var(--sh-surface-container); color: var(--sh-on-surface-variant); font-weight: 700; }
#sec-communication .avatar.reg, #sec-communication .avatar.agent { background: var(--sh-surface-high); color: var(--sh-tertiary); }
#sec-communication .avatar.demo { background: #ffddb8; color: var(--sh-secondary); }
#sec-communication .avatar.out { background: var(--sh-primary-container); color: var(--sh-on-primary-container); }
#sec-communication .avatar.sms, #sec-communication .avatar.wa { background: var(--sh-ok-bg); color: var(--sh-ok); }
#sec-communication .dr-ico { background: var(--sh-surface-container); color: var(--sh-on-surface-variant); border-radius: 50%; }
#sec-communication .draft-row.selected .dr-ico { background: var(--sh-primary-container); color: var(--sh-on-primary-container); }

/* Pills */
#sec-communication .pill { border: none; border-radius: 6px; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
#sec-communication .pill-reg, #sec-communication .pill-in, #sec-communication .pill-agent { background: var(--sh-surface-high); color: var(--sh-tertiary); }
#sec-communication .pill-demo, #sec-communication .pill-prospect, #sec-communication .pill-unread { background: #ffddb8; color: var(--sh-on-primary-container); }
#sec-communication .pill-out, #sec-communication .pill-proposals { background: var(--sh-primary-container); color: var(--sh-on-primary-container); }
#sec-communication .pill-muted, #sec-communication .pill-draft { background: var(--sh-surface-container); color: var(--sh-on-surface-variant); }
#sec-communication .pill-sms, #sec-communication .pill-wa { background: var(--sh-ok-bg); color: var(--sh-ok); }
#sec-communication .pill-disc { background: var(--sh-error-container); color: var(--sh-error); }

/* Thread pane + messages */
#sec-communication .thread-pane, #sec-communication .draft-resume-pane, #sec-communication .compose-main { background: var(--sh-surface-lowest); }
#sec-communication .thread-pane-head, #sec-communication .draft-resume-head { border-bottom: 1px solid var(--sh-surface-container); }
#sec-communication .thread-pane-head h2, #sec-communication .draft-resume-head h2 { color: var(--sh-on-surface); font-weight: 700; font-size: 18px; }
#sec-communication .thread-pane-meta, #sec-communication .draft-resume-meta, #sec-communication .thread-phone { color: var(--sh-on-surface-variant); }
#sec-communication .messages { background: var(--sh-surface); }
#sec-communication .msg { background: var(--sh-surface-lowest); border: none; box-shadow: var(--sh-shadow); border-radius: 12px; }
#sec-communication .msg.inbound { border-radius: 4px 12px 12px 12px; }
#sec-communication .msg.outbound { background: #ffeed6; color: var(--sh-on-surface); border-radius: 12px 4px 12px 12px; }
#sec-communication .msg.wa-out { background: var(--sh-ok-bg); color: var(--sh-on-surface); border: none; }
#sec-communication .msg .msg-who, #sec-communication .msg.inbound .msg-who { color: var(--sh-on-surface); font-weight: 700; }
#sec-communication .msg.outbound .msg-who { color: var(--sh-primary); }
#sec-communication .msg.wa-out .msg-who { color: var(--sh-ok); }
#sec-communication .msg-when, #sec-communication .msg-addr, #sec-communication .msg-ids, #sec-communication .msg.outbound .msg-when, #sec-communication .msg.outbound .msg-addr, #sec-communication .msg.outbound .msg-ids, #sec-communication .msg.wa-out .msg-when, #sec-communication .msg.wa-out .msg-addr { color: var(--sh-outline); }
#sec-communication .msg-body, #sec-communication .msg.outbound .msg-body, #sec-communication .msg.wa-out .msg-body { color: var(--sh-on-surface); }
#sec-communication .msg.outbound .msg-html, #sec-communication .msg.outbound .msg-html * { color: var(--sh-on-surface) !important; }
#sec-communication .msg.outbound .inbox-code { color: var(--sh-primary); }
#sec-communication .msg.inbound .msg-tag, #sec-communication .msg.outbound .msg-tag, #sec-communication .msg.wa-out .msg-tag { background: var(--sh-surface-container); color: var(--sh-on-surface-variant); font-weight: 700; }

/* Composer (reply) */
#sec-communication .composer { background: var(--sh-surface-lowest); border-top: 1px solid var(--sh-surface-container); }
#sec-communication .composer-label { color: var(--sh-on-surface-variant); font-weight: 700; }
#sec-communication .hint-pill { background: var(--sh-ok-bg); color: var(--sh-ok); border: none; font-weight: 700; }
#sec-communication .composer-from { color: var(--sh-on-surface-variant); }
#sec-communication .composer-from strong { color: var(--sh-on-surface); }

/* Empty states */
#sec-communication .empty-icon { background: var(--sh-surface-low); border: none; border-radius: 50%; color: var(--sh-primary); width: 64px; height: 64px; }
#sec-communication .empty-state h3, #sec-communication .draft-empty h3 { color: var(--sh-on-surface); font-weight: 700; }
#sec-communication .empty-state p, #sec-communication .draft-empty p, #sec-communication .pane-loading { color: var(--sh-on-surface-variant); }

/* Connect / forms / banners */
#sec-communication .connect-logo { background: var(--sh-primary-container); color: var(--sh-on-primary-container); border: none; box-shadow: var(--sh-shadow-lg); border-radius: 16px; }
#sec-communication .connect-hero h3 { color: var(--sh-on-surface); font-weight: 700; }
#sec-communication .connect-hero p, #sec-communication .form-hint { color: var(--sh-on-surface-variant); }
#sec-communication .form-field label { color: var(--sh-on-surface-variant); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
#sec-communication .form-field .req { color: var(--sh-error); }
#sec-communication .connect-note { background: var(--sh-surface-low); border: none; color: var(--sh-on-surface-variant); border-radius: 8px; }
#sec-communication .connect-flag { background: var(--sh-surface-low); border: none; color: var(--sh-on-surface-variant); }
#sec-communication .connect-flag.on { background: var(--sh-ok-bg); color: var(--sh-ok); }
#sec-communication .status-banner { border-radius: 12px; box-shadow: var(--sh-shadow); }
#sec-communication .status-banner.ok { background: var(--sh-ok-bg); border: none; color: var(--sh-ok); }
#sec-communication .status-banner.warn { background: var(--sh-error-container); border: none; color: var(--sh-error); }
#sec-communication .provider-chip { background: var(--sh-primary-container); color: var(--sh-on-primary-container); font-weight: 700; }
#sec-communication .sms-header-bar, #sec-communication .wa-header-bar { background: var(--sh-surface-low); border-bottom: 1px solid var(--sh-surface-container); color: var(--sh-on-surface-variant); }

/* Email compose overlay + templates + drafts */
#sec-communication .compose-cta-hint, #sec-communication .compose-meta { color: var(--sh-on-surface-variant); }
#sec-communication .compose-overlay { background: var(--sh-surface-lowest); border: none; border-radius: 12px; box-shadow: var(--sh-shadow-lg); }
#sec-communication .compose-head, #sec-communication .compose-foot, #sec-communication .fmt-bar { background: var(--sh-surface-low); border-color: var(--sh-surface-container); }
#sec-communication .compose-head h2, #sec-communication .tpl-panel-head h3, #sec-communication .drafts-rail-head h3 { color: var(--sh-on-surface); font-weight: 700; }
#sec-communication .compose-field { border-bottom: 1px solid var(--sh-surface-low); }
#sec-communication .compose-lbl { color: var(--sh-on-surface-variant); font-weight: 700; }
#sec-communication .compose-field input[type="text"], #sec-communication .compose-field input[type="email"], #sec-communication .compose-body-wrap textarea { color: var(--sh-on-surface); font-family: var(--sh-font); }
#sec-communication .from-trigger { background: var(--sh-surface-low); border: none; border-radius: 8px; }
#sec-communication .from-trigger:hover, #sec-communication .from-trigger.open { background: var(--sh-surface-container); box-shadow: 0 0 0 3px rgba(245,158,11,.2); }
#sec-communication .from-addr, #sec-communication .fo-title, #sec-communication .tpl-name, #sec-communication .tp-subj { color: var(--sh-on-surface); font-weight: 700; }
#sec-communication .from-role, #sec-communication .fo-sub, #sec-communication .tpl-desc, #sec-communication .tp-lbl, #sec-communication .attach-zone-hint, #sec-communication .attach-drop-cta, #sec-communication .compose-foot .outbound-note { color: var(--sh-on-surface-variant); }
#sec-communication .compose-foot .outbound-note strong { color: var(--sh-primary); }
#sec-communication .from-menu { background: var(--sh-surface-lowest); border: none; border-radius: 12px; box-shadow: var(--sh-shadow-lg); }
#sec-communication .from-option:hover { background: var(--sh-surface-low); }
#sec-communication .from-option.selected { background: var(--sh-surface-container); border-color: transparent; }
#sec-communication .fo-check { color: var(--sh-primary); }
#sec-communication .fo-mark.proposals { background: var(--sh-primary-container); color: var(--sh-on-primary-container); }
#sec-communication .fo-mark.registration { background: var(--sh-surface-high); color: var(--sh-tertiary); }
#sec-communication .fo-mark.demo { background: #ffddb8; color: var(--sh-secondary); }
#sec-communication .from-note { background: var(--sh-surface-low); border: none; color: var(--sh-on-surface-variant); }
#sec-communication .fmt-btn { color: var(--sh-on-surface-variant); }
#sec-communication .fmt-btn:hover { background: var(--sh-surface-lowest); border-color: transparent; color: var(--sh-on-surface); box-shadow: var(--sh-shadow); }
#sec-communication .fmt-sep { background: var(--sh-outline-variant); }
#sec-communication .attach-zone { background: var(--sh-surface-low); border: 1.5px dashed var(--sh-outline-variant); border-radius: 12px; }
#sec-communication .attach-zone.proposal-hint { border-color: var(--sh-primary-container); background: var(--sh-surface-low); }
#sec-communication .attach-zone.dragover { border-color: var(--sh-primary-container); background: var(--sh-surface-container); }
#sec-communication .attach-zone-title { color: var(--sh-on-surface); }
#sec-communication .attach-chip { background: var(--sh-surface-lowest); border: none; box-shadow: var(--sh-shadow); color: var(--sh-on-surface); }
#sec-communication .ac-rm { background: var(--sh-surface-container); }
#sec-communication .ac-rm:hover { background: var(--sh-error-container); color: var(--sh-error); }
#sec-communication .linkish, #sec-communication .cc-toggle { color: var(--sh-primary); font-weight: 700; }
#sec-communication .tpl-panel { background: var(--sh-surface-low); border-left: 1px solid var(--sh-surface-container); }
#sec-communication .tpl-panel-head, #sec-communication .tpl-insert-bar { border-color: var(--sh-surface-container); }
#sec-communication .close-x { background: var(--sh-surface-lowest); border: none; box-shadow: var(--sh-shadow); color: var(--sh-on-surface-variant); }
#sec-communication .tpl-card, #sec-communication .tpl-preview { background: var(--sh-surface-lowest); border: none; box-shadow: var(--sh-shadow); border-radius: 12px; color: var(--sh-on-surface); }
#sec-communication .tpl-card:hover { background: var(--sh-surface-lowest); box-shadow: 0 0 0 2px var(--sh-surface-high); }
#sec-communication .tpl-card.selected { background: var(--sh-surface-lowest); box-shadow: 0 0 0 2px var(--sh-primary-container); }

@media (max-width: 1100px) {
  #sec-communication .inbox-rail, #sec-communication .drafts-rail { border-bottom: 1px solid var(--sh-surface-container); }
}
@media (max-width: 860px) {
  #sec-communication { padding-top: 12px; }
  #sec-communication .sec-title { font-size: 24px; line-height: 30px; }
  #sec-communication .channel-switcher { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  #sec-communication .inbox-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #sec-communication .compose-field { flex-wrap: wrap; }
  #sec-communication .compose-lbl { width: 100%; }
}

/* ───────── Hub rebuild (Stitch "Communications & Outbox Hub") ───────── */
/* Hero: telemetry-style header card — eyebrow + live dot, headline, channel switcher on the right */
#sec-communication .comms-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; background: var(--sh-surface-low); border-radius: 12px; box-shadow: var(--sh-shadow); padding: 20px 24px; margin-bottom: 24px; }
#sec-communication .comms-hero-main { min-width: 0; flex: 1 1 320px; }
#sec-communication .comms-eyebrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
#sec-communication .comms-eyebrow .inbox-kicker { color: var(--sh-primary); }
#sec-communication .comms-live { width: 8px; height: 8px; border-radius: 50%; background: var(--sh-ok); box-shadow: 0 0 0 3px rgba(6,118,71,.18); }
#sec-communication .comms-eyebrow .inbox-top-title { margin: 0; font-size: 12px; font-weight: 500; color: var(--sh-outline); }
#sec-communication .comms-hero .sec-title { margin: 0; }
#sec-communication .comms-hero .sec-sub:empty { display: none; }
#sec-communication .comms-hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; min-width: 0; max-width: 100%; }
#sec-communication .comms-hero-side .topbar-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
#sec-communication .comms-hero-side .channel-switcher { margin: 0; background: var(--sh-surface-lowest); }
#sec-communication .channel-switcher .ch-ico .material-symbols-outlined { font-size: 14px; }
#sec-communication .channel-tab .ch-ico { width: 24px; height: 24px; }

/* KPI tiles: caps label + icon chip on top, stat metric below */
#sec-communication .kpi { background: var(--sh-surface-low); display: flex; flex-direction: column; gap: 8px; min-height: 112px; padding: 16px 16px 14px; }
#sec-communication .kpi::before { display: none; }
#sec-communication .kpi::after { content: 'insights'; font-family: 'Material Symbols Outlined'; font-feature-settings: 'liga'; font-size: 18px; line-height: 1; position: absolute; top: 14px; right: 14px; color: var(--sh-primary); }
#sec-communication .kpi:first-child::after { color: var(--sh-secondary); }
#sec-communication .kpi-lbl { padding-right: 28px; }
#sec-communication .kpi-val { margin-top: auto; font-size: 28px; line-height: 32px; font-weight: 800; }
#sec-communication .kpi-val.sm { font-size: 16px; line-height: 22px; }
#sec-communication .kpi-note { margin-top: 0; font-size: 12px; font-weight: 600; }

/* Folder bar (Inbox / Drafts / Sent + compose) */
#sec-communication .compose-cta-bar { background: var(--sh-surface-low); border-radius: 12px; padding: 8px; gap: 12px; box-shadow: var(--sh-shadow); }
#sec-communication .compose-cta-bar .mailbox-tabs { background: var(--sh-surface-lowest); }
#sec-communication .compose-cta-bar .inbox-refresh { margin-left: auto; }

/* Three-column workspace: queues | threads | conversation. The rail's children are laid out
   straight onto the shell grid (display: contents) so the existing markup and ids are kept. */
#sec-communication .inbox-card { background: transparent; box-shadow: none; border-radius: 0; overflow: visible; min-height: 0; }
#sec-communication .inbox-card > .list-toolbar, #sec-communication #inboxListPane { background: var(--sh-surface-low); }
#sec-communication .inbox-card > .list-toolbar { border: none; border-radius: 12px 12px 0 0; padding: 14px 16px; box-shadow: var(--sh-shadow); }
#sec-communication #inboxListPane { border-radius: 0 0 12px 12px; box-shadow: var(--sh-shadow); overflow: hidden; }
#sec-communication #inboxShell { display: grid; grid-template-columns: 208px minmax(0, 340px) minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr); column-gap: 16px; height: calc(100vh - 220px); min-height: 640px; }
#sec-communication #inboxShell .inbox-rail { display: contents; }
#sec-communication #inboxShell .inbox-rail-head { grid-column: 1; grid-row: 1 / -1; align-self: start; background: var(--sh-surface-low); border: none; border-radius: 12px; box-shadow: var(--sh-shadow); padding: 16px 12px; }
#sec-communication #inboxShell .inbox-rail-head::before { content: 'Channel queues'; display: block; padding: 0 8px 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sh-on-surface-variant); }
#sec-communication #inboxShell .inbox-rail-head .mailbox-tabs { flex-direction: column; background: transparent; padding: 0; gap: 2px; }
#sec-communication #inboxShell .inbox-rail-head .mailbox-tab { display: flex; align-items: center; justify-content: space-between; flex-direction: row-reverse; text-align: left; padding: 9px 10px; font-size: 13px; }
#sec-communication #inboxShell .inbox-rail-head .mailbox-tab .count { margin: 0; min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 999px; background: var(--sh-surface-highest); color: var(--sh-on-surface); font-size: 11px; font-weight: 700; opacity: 1; }
#sec-communication #inboxShell .inbox-rail-head .mailbox-tab.active { background: var(--sh-surface-high); box-shadow: none; }
#sec-communication #inboxShell .inbox-rail-head .mailbox-tab.active .count { background: var(--sh-primary); color: var(--sh-on-primary); }
#sec-communication #inboxShell .inbox-filters { grid-column: 2; grid-row: 1; background: var(--sh-surface-low); border: none; border-radius: 12px 12px 0 0; padding: 14px 14px 8px; justify-content: space-between; box-shadow: var(--sh-shadow); }
#sec-communication #inboxShell .inbox-rail > .inbox-search { grid-column: 2; grid-row: 2; margin: 0; padding: 0 14px 12px; background: var(--sh-surface-low); box-shadow: var(--sh-shadow); }
#sec-communication #inboxShell .inbox-rail > .inbox-search .ico { left: 26px; }
#sec-communication #inboxShell .inbox-rail > .inbox-search input { background: var(--sh-surface-lowest); }
#sec-communication #inboxShell .inbox-rail > .thread-list { grid-column: 2; grid-row: 3 / -1; background: var(--sh-surface-low); border-radius: 0 0 12px 12px; box-shadow: var(--sh-shadow); padding: 0 8px 8px; overflow-y: auto; }
#sec-communication #inboxShell .inbox-rail .thread-row { border: none; border-radius: 12px; margin-bottom: 6px; background: var(--sh-surface-lowest); box-shadow: var(--sh-shadow); padding: 12px; }
#sec-communication #inboxShell .inbox-rail .thread-row:hover { background: var(--sh-surface-lowest); box-shadow: 0 0 0 2px var(--sh-surface-high); }
#sec-communication #inboxShell .inbox-rail .thread-row.selected { background: var(--sh-surface-high); box-shadow: inset 3px 0 0 var(--sh-primary-container); }
#sec-communication #inboxShell > .thread-pane { grid-column: 3; grid-row: 1 / -1; background: var(--sh-surface-low); border-radius: 12px; box-shadow: var(--sh-shadow); overflow: hidden; }
#sec-communication .thread-pane-head { background: var(--sh-surface-low); border-bottom: none; padding: 16px 20px; }
#sec-communication .messages { background: var(--sh-surface-low); }
#sec-communication .composer { background: var(--sh-surface-low); border-top: none; padding: 12px 16px 16px; }
#sec-communication .composer textarea { background: var(--sh-surface-lowest); }
#sec-communication .composer-bar { padding-top: 4px; }
#sec-communication .msg.inbound { background: var(--sh-surface-high); box-shadow: none; }
#sec-communication .msg.outbound { background: var(--sh-primary-container); color: var(--sh-on-primary-container); box-shadow: none; }
#sec-communication .msg.outbound .msg-who, #sec-communication .msg.outbound .msg-body, #sec-communication .msg.outbound .msg-when, #sec-communication .msg.outbound .msg-addr, #sec-communication .msg.outbound .msg-ids, #sec-communication .msg.outbound .inbox-code { color: var(--sh-on-primary-container); }
#sec-communication .msg.outbound .msg-html, #sec-communication .msg.outbound .msg-html * { color: var(--sh-on-primary-container) !important; }
#sec-communication .msg.outbound .msg-tag { background: rgba(97,59,0,.14); color: var(--sh-on-primary-container); }
#sec-communication .msg.wa-out { background: var(--sh-ok-bg); }
#sec-communication .empty-state { background: var(--sh-surface-low); }

/* SMS / WhatsApp / drafts / compose panels use the same card language */
#sec-communication .drafts-shell, #sec-communication .compose-overlay { background: var(--sh-surface-low); }
#sec-communication .drafts-rail { background: var(--sh-surface-low); }
#sec-communication .draft-row { border: none; border-radius: 12px; margin: 0 8px 6px; width: auto; box-shadow: var(--sh-shadow); }
#sec-communication .draft-resume-pane, #sec-communication .compose-main { background: var(--sh-surface-low); }
#sec-communication .compose-field, #sec-communication .compose-form { background: var(--sh-surface-low); }
#sec-communication .compose-field input[type="text"], #sec-communication .compose-field input[type="email"] { background: var(--sh-surface-lowest); border-radius: 8px; padding: 7px 10px; }

@media (max-width: 1280px) {
  #sec-communication #inboxShell { grid-template-columns: 180px minmax(0, 300px) minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  #sec-communication #inboxShell { display: flex; flex-direction: column; gap: 16px; height: auto; min-height: 0; }
  #sec-communication #inboxShell .inbox-rail { display: flex; flex-direction: column; gap: 0; max-height: none; border: none; background: transparent; }
  #sec-communication #inboxShell .inbox-rail-head, #sec-communication #inboxShell .inbox-filters, #sec-communication #inboxShell .inbox-rail > .inbox-search, #sec-communication #inboxShell .inbox-rail > .thread-list, #sec-communication #inboxShell > .thread-pane { grid-column: auto; grid-row: auto; }
  #sec-communication #inboxShell .inbox-rail-head { border-radius: 12px 12px 0 0; padding: 12px; }
  #sec-communication #inboxShell .inbox-rail-head::before { display: none; }
  #sec-communication #inboxShell .inbox-rail-head .mailbox-tabs { flex-direction: row; flex-wrap: wrap; }
  #sec-communication #inboxShell .inbox-rail > .thread-list { max-height: 360px; }
  #sec-communication #inboxShell > .thread-pane { min-height: 520px; }
  #sec-communication .comms-hero-side { align-items: flex-start; width: 100%; }
  #sec-communication .comms-hero-side .topbar-meta { justify-content: flex-start; }
}
@media (max-width: 860px) {
  #sec-communication .comms-hero { padding: 16px; }
  #sec-communication .comms-hero-side .channel-switcher { width: 100%; }
}

/* SMS / WhatsApp shells keep the two-column rail + pane, in the same card language */
#sec-communication #commSms .inbox-shell, #sec-communication #commWa .inbox-shell { column-gap: 16px; grid-template-columns: 360px minmax(0, 1fr); }
#sec-communication #commSms .inbox-rail, #sec-communication #commWa .inbox-rail { background: var(--sh-surface-low); border: none; border-radius: 12px; box-shadow: var(--sh-shadow); overflow: hidden; }
#sec-communication #commSms .thread-pane, #sec-communication #commWa .thread-pane { background: var(--sh-surface-low); border-radius: 12px; box-shadow: var(--sh-shadow); overflow: hidden; }
#sec-communication #commSms .thread-row, #sec-communication #commWa .thread-row { border: none; border-radius: 12px; margin: 0 8px 6px; width: auto; box-shadow: var(--sh-shadow); }
#sec-communication #commSms .thread-list, #sec-communication #commWa .thread-list { background: var(--sh-surface-low); padding-top: 4px; }
@media (max-width: 1100px) {
  #sec-communication #commSms .inbox-shell, #sec-communication #commWa .inbox-shell { grid-template-columns: 1fr; row-gap: 16px; }
}

/* ───────── SMS + WhatsApp hub (Stitch "Communication & SMS Hub", mapped to the gold theme; WhatsApp reuses it) ───────── */
#sec-communication :is(#commSms, #commWa) .sms-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 28px; background: var(--sh-surface-lowest); border-radius: 12px; box-shadow: var(--sh-shadow); padding: 14px 20px; margin-bottom: 20px; font-size: 13px; color: var(--sh-on-surface-variant); }
:is(#commSms, #commWa) .sms-strip-main { display: flex; align-items: center; gap: 10px; color: var(--sh-on-surface); font-size: 14px; }
:is(#commSms, #commWa) .sms-strip-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sh-ok); box-shadow: 0 0 0 3px rgba(6,118,71,.18); }
:is(#commSms, #commWa) .sms-strip-item { display: flex; align-items: center; gap: 8px; }
:is(#commSms, #commWa) .sms-strip-item strong { color: var(--sh-on-surface); }
:is(#commSms, #commWa) .sms-strip-tag { background: var(--sh-surface-container); color: var(--sh-on-surface); font-size: 10px; font-weight: 700; letter-spacing: .08em; padding: 3px 8px; border-radius: 6px; }
:is(#commSms, #commWa) .sms-strip .btn:first-of-type { margin-left: auto; }

:is(#commSms, #commWa) .sms-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#sec-communication :is(#commSms, #commWa) .sms-kpi { background: var(--sh-surface-lowest); min-height: 128px; }
#sec-communication :is(#commSms, #commWa) .sms-kpi::after { display: none; }
:is(#commSms, #commWa) .sms-kpi-ico { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
:is(#commSms, #commWa) .sms-kpi-ico.gold { background: #ffeed6; color: var(--sh-primary); }
:is(#commSms, #commWa) .sms-kpi-ico.blue { background: var(--sh-surface-high); color: var(--sh-tertiary); }
:is(#commSms, #commWa) .sms-kpi-ico.green { background: var(--sh-ok-bg); color: var(--sh-ok); }
:is(#commSms, #commWa) .sms-kpi-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
:is(#commSms, #commWa) .sms-kpi-row .kpi-val { margin-top: 0; }
:is(#commSms, #commWa) .sms-kpi-chip { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--sh-surface-container); color: var(--sh-on-surface-variant); white-space: nowrap; }

:is(#commSms, #commWa) .sms-work { display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); gap: 16px; align-items: stretch; height: calc(100vh - 150px); min-height: 640px; }
:is(#commSms, #commWa) .sms-list-card { display: flex; flex-direction: column; min-height: 0; background: var(--sh-surface-low); border-radius: 12px; box-shadow: var(--sh-shadow); overflow: hidden; }
:is(#commSms, #commWa) .sms-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 16px 12px; }
:is(#commSms, #commWa) .sms-list-head h3 { font-size: 18px; font-weight: 700; color: var(--sh-on-surface); }
:is(#commSms, #commWa) .sms-list-head p { font-size: 12px; color: var(--sh-on-surface-variant); margin-top: 2px; }
:is(#commSms, #commWa) .sms-list-card .inbox-search { padding: 0 16px 10px; position: relative; }
:is(#commSms, #commWa) .sms-list-card .inbox-search .ico { position: absolute; left: 28px; top: 50%; transform: translateY(-65%); }
:is(#commSms, #commWa) .sms-list-card .inbox-search input { background: var(--sh-surface-lowest); width: 100%; padding-top: 10px; padding-bottom: 10px; }
:is(#commSms, #commWa) .sms-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
:is(#commSms, #commWa) .sms-chip { border: none; background: var(--sh-surface-lowest); color: var(--sh-on-surface); font-family: var(--sh-font); font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 6px 12px; border-radius: 999px; cursor: pointer; box-shadow: var(--sh-shadow); }
:is(#commSms, #commWa) .sms-chip:hover { background: var(--sh-surface-container); }
:is(#commSms, #commWa) .sms-chip.on { background: var(--sh-primary-container); color: var(--sh-on-primary-container); }
:is(#commSms, #commWa) .sms-list-card .thread-list { flex: 1; min-height: 0; overflow-y: auto; background: transparent; padding: 0 8px 8px; }
#sec-communication :is(#commSms, #commWa) .sms-list-card .thread-row { margin: 0 0 6px; border-radius: 12px; padding: 14px; }
#sec-communication :is(#commSms, #commWa) .sms-list-card .thread-row.selected { background: #fff3e0; box-shadow: inset 4px 0 0 var(--sh-primary-container); }
:is(#commSms, #commWa) .sms-list-card .thread-from { font-size: 15px; font-weight: 700; }
:is(#commSms, #commWa) .sms-list-card .thread-time { font-size: 11px; font-weight: 600; }
:is(#commSms, #commWa) .sms-list-card .avatar { width: 40px; height: 40px; border-radius: 10px; font-size: 12px; background: var(--sh-surface-container); color: var(--sh-on-surface); }
#sec-communication :is(#commSms, #commWa) .sms-list-card .thread-row.selected .avatar { background: var(--sh-primary-container); color: var(--sh-on-primary-container); }

#sec-communication :is(#commSms, #commWa) .sms-pane { display: flex; flex-direction: column; min-height: 0; background: var(--sh-surface-low); }
:is(#commSms, #commWa) .sms-pane .thread-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--sh-surface-lowest); border-bottom: 1px solid var(--sh-surface-container); }
:is(#commSms, #commWa) .sms-head-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
:is(#commSms, #commWa) .sms-head-id h2 { font-size: 20px; display: flex; align-items: center; gap: 10px; }
:is(#commSms, #commWa) .avatar.lg { width: 48px; height: 48px; border-radius: 10px; font-size: 14px; display: flex; align-items: center; justify-content: center; }
:is(#commSms, #commWa) .thread-pane-actions { display: flex; gap: 8px; }
:is(#commSms, #commWa) .sms-pane .messages { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 20px; display: flex; flex-direction: column; gap: 18px; background: var(--sh-surface); }
#sec-communication :is(#commSms, #commWa) .sms-pane .msg { display: flex; align-items: flex-end; gap: 10px; background: transparent; box-shadow: none; border-radius: 0; padding: 0; max-width: 100%; }
#sec-communication :is(#commSms, #commWa) .sms-pane .msg.outbound { flex-direction: row; justify-content: flex-end; background: transparent; }
:is(#commSms, #commWa) .msg-col { display: flex; flex-direction: column; gap: 4px; max-width: 72%; }
:is(#commSms, #commWa) .msg.outbound .msg-col { align-items: flex-end; }
:is(#commSms, #commWa) .msg-bubble { padding: 14px 18px; border-radius: 18px 18px 18px 4px; background: var(--sh-surface-high); color: var(--sh-on-surface); font-size: 14px; line-height: 1.5; }
:is(#commSms, #commWa) .msg.outbound .msg-bubble { border-radius: 18px 18px 4px 18px; background: var(--sh-primary-container); color: var(--sh-on-primary-container); }
#sec-communication :is(#commSms, #commWa) .msg.outbound .msg-body, #sec-communication :is(#commSms, #commWa) .msg.inbound .msg-body { color: inherit; }
:is(#commSms, #commWa) .msg-foot { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--sh-outline); padding: 0 4px; }
:is(#commSms, #commWa) .msg-foot .msg-tag { background: transparent; padding: 0; }
:is(#commSms, #commWa) .msg-foot .msg-tag::before { content: '· '; }
:is(#commSms, #commWa) .sms-pane .avatar { width: 36px; height: 36px; flex-shrink: 0; font-size: 11px; display: flex; align-items: center; justify-content: center; }
:is(#commSms, #commWa) .sms-pane .composer { background: var(--sh-surface-lowest); border-top: 1px solid var(--sh-surface-container); padding: 14px 20px 18px; }
:is(#commSms, #commWa) .sms-tpls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
:is(#commSms, #commWa) .sms-tpls > span { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sh-on-surface-variant); margin-right: 4px; }
:is(#commSms, #commWa) .sms-tpls .sms-chip { background: var(--sh-surface-low); box-shadow: none; }
:is(#commSms, #commWa) .sms-pane .composer textarea { width: 100%; min-height: 84px; background: var(--sh-surface-low); }
:is(#commSms, #commWa) .sms-pane .composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
:is(#commSms, #commWa) .sms-pane .composer-from { font-size: 12px; }
:is(#commSms, #commWa) .sms-pane .composer-actions { display: flex; align-items: center; gap: 8px; }
:is(#commSms, #commWa) .sms-pane .btn-gold .material-symbols-outlined { font-size: 16px; margin-left: 4px; }
:is(#commSms, #commWa) .sms-pane .empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
@media (max-width: 1100px) {
  :is(#commSms, #commWa) .sms-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(#commSms, #commWa) .sms-work { grid-template-columns: 1fr; height: auto; }
  :is(#commSms, #commWa) .sms-list-card { max-height: 480px; }
  :is(#commSms, #commWa) .sms-pane { min-height: 560px; }
}
#sec-communication :is(#commSms, #commWa) .msg-foot .msg-tag, #sec-communication :is(#commSms, #commWa) .msg.inbound .msg-foot .msg-tag, #sec-communication :is(#commSms, #commWa) .msg.outbound .msg-foot .msg-tag { background: transparent; color: var(--sh-outline); padding: 0; font-weight: 600; }

:is(#commSms, #commWa) .sms-strip.warn { background: #fff3e0; }
:is(#commSms, #commWa) .sms-strip.warn .sms-strip-dot { background: var(--sh-primary-container); box-shadow: 0 0 0 3px rgba(245,158,11,.25); }
:is(#commSms, #commWa) .sms-strip .provider-chip { margin-left: 4px; }

/* ───────── Email hub (Stitch "Communication & Email Hub", mapped to the gold theme) ───────── */
/* Channel switcher: solid gold active tab (shared by Email / SMS / WhatsApp) */
#sec-communication .channel-tab.active { background: var(--sh-primary-container); color: var(--sh-on-primary-container); box-shadow: 0 1px 4px rgba(133,83,0,.25); }
#sec-communication .channel-tab.active .ch-ico { background: transparent; color: var(--sh-on-primary-container); }
#sec-communication .channel-tab.active .ch-badge { background: var(--sh-surface-lowest); color: var(--sh-primary); }
#sec-communication .channel-tab.active .ch-status { background: rgba(255,255,255,.55); }

/* Folder bar */
#commEmail .compose-cta-bar { background: var(--sh-surface-lowest); padding: 12px 16px; align-items: center; }
#commEmail .compose-cta-bar .btn-compose { padding: 10px 18px; }
#commEmail .compose-cta-bar .mailbox-tabs { background: transparent; padding: 0; margin-left: 8px; }
#commEmail .compose-cta-bar .mailbox-tab { display: inline-flex; align-items: center; gap: 6px; }
#commEmail .compose-cta-bar .mailbox-tab .material-symbols-outlined { font-size: 16px; }
#commEmail .compose-cta-bar .mailbox-tab.active { background: var(--sh-surface-container); box-shadow: none; }
#commEmail .compose-cta-bar .mailbox-tab .count { background: var(--sh-primary); color: var(--sh-on-primary); border-radius: 999px; padding: 1px 7px; font-size: 10px; font-weight: 700; opacity: 1; }
#commEmail .compose-cta-bar .compose-cta-hint { margin-left: auto; font-size: 12px; }
#commEmail .compose-cta-bar .inbox-refresh, #commEmail .list-toolbar .inbox-refresh { width: 36px; height: 36px; padding: 0; justify-content: center; background: var(--sh-surface-low); border-radius: 8px; margin-left: 0; }
#commEmail .compose-cta-bar .compose-cta-hint + .inbox-refresh { margin-left: 0; }

/* KPI cards: white, icon chip top-right */
#sec-communication #commEmail .email-kpi { background: var(--sh-surface-lowest); min-height: 120px; }
#commEmail .email-kpi-ico { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
#commEmail .email-kpi-ico .material-symbols-outlined { font-size: 16px; }
#commEmail .email-kpi-ico.gold { background: #ffeed6; color: var(--sh-primary); }
#commEmail .email-kpi-ico.amber { background: #ffddb8; color: var(--sh-secondary); }
#commEmail .email-kpi-ico.blue { background: var(--sh-surface-container); color: var(--sh-tertiary); }
#commEmail .email-kpi-ico.green { background: var(--sh-ok-bg); color: var(--sh-ok); }
#sec-communication #commEmail .email-kpi::after { display: none; }
#commEmail .email-kpi:nth-child(2) .kpi-val { color: var(--sh-primary); }

/* Filter toolbar: white card, pill chips, search + sync */
#sec-communication #commEmail .inbox-card > .list-toolbar { background: var(--sh-surface-lowest); border-radius: 12px; margin-bottom: 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
#commEmail .list-toolbar .mailbox-tabs { background: transparent; padding: 0; gap: 8px; }
#commEmail .list-toolbar .mailbox-tab { background: var(--sh-surface-container); border-radius: 8px; padding: 6px 12px; font-size: 11px; font-weight: 600; }
#commEmail .list-toolbar .mailbox-tab:hover { background: var(--sh-surface-high); }
#sec-communication #commEmail .list-toolbar .mailbox-tab.active { background: var(--sh-primary-container); color: var(--sh-on-primary-container); box-shadow: 0 1px 3px rgba(133,83,0,.2); font-weight: 700; }
#commEmail .list-toolbar .mailbox-tab .count::before { content: '('; }
#commEmail .list-toolbar .mailbox-tab .count::after { content: ')'; }
#commEmail .list-toolbar .mailbox-tab.active .count { color: inherit; }
#commEmail .list-toolbar .filter-toggle { background: transparent; }
#commEmail .list-toolbar .filter-toggle.on { background: transparent; color: var(--sh-on-surface); }
#commEmail .list-toolbar .inbox-search { margin-left: auto; width: 100%; max-width: 380px; flex: 1 1 260px; order: 2; position: relative; }
#commEmail .list-toolbar .inbox-search input { width: 100%; padding-top: 9px; padding-bottom: 9px; }
#commEmail .list-toolbar .inbox-refresh { order: 3; }

/* Thread list: white card, column head, airy rows */
#sec-communication #commEmail #inboxListPane { background: var(--sh-surface-lowest); border-radius: 12px; }
#commEmail .list-colhead { display: flex; justify-content: space-between; padding: 11px 24px; background: var(--sh-surface-low); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sh-on-surface-variant); }
#sec-communication #commEmail .inbox-list .thread-row { padding: 18px 24px; border-bottom: none; gap: 16px; }
#sec-communication #commEmail .inbox-list .thread-row:hover { background: var(--sh-surface-low); }
#commEmail .inbox-list .thread-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#commEmail .inbox-list .thread-top .unread-dot { order: -1; }
#commEmail .inbox-list .thread-pills { display: inline-flex; align-items: center; gap: 6px; }
#commEmail .inbox-list .thread-time { margin-left: auto; font-size: 12px; }
#commEmail .inbox-list .thread-from { font-size: 14px; }
#commEmail .inbox-list .thread-subject { font-size: 14px; margin-top: 4px; }
#commEmail .inbox-list .thread-snippet { font-size: 13px; margin-top: 2px; }
#commEmail .inbox-list .avatar { width: 40px; height: 40px; font-size: 16px; font-weight: 700; }
#sec-communication #commEmail .inbox-list .avatar.out { background: #ffeed6; color: var(--sh-primary); }
#sec-communication #commEmail .inbox-list .avatar.reg { background: var(--sh-surface-high); color: var(--sh-tertiary); }
#sec-communication #commEmail .inbox-list .avatar.demo { background: #ffddb8; color: var(--sh-secondary); }
#commEmail .list-foot { padding: 14px 24px; font-size: 12px; color: var(--sh-on-surface-variant); background: var(--sh-surface-lowest); }
