/* Shared embedded chat skin; global list layout remains header-only. */
:root.card-mode #app { background: #fff; }
:root.card-mode #thread { position: relative; border-radius: 22px; }
:root.card-mode #thread-menu { display: none; }
:root.chat-redesign .chat .last:has(.draft-label) { color: #727980; font-weight: 400; }
:root.chat-redesign .draft-label { color: #b57539; }
:root.chat-redesign.templates-open #messages { display: none; }
:root.chat-redesign #thread > .quick-replies-panel { position: static; flex: 1 1 0; min-height: 0; max-height: none; margin: 0 0 10px; padding: 16px 18px 0; border: 0; border-radius: 0; box-shadow: none; background: #f5fafc; color: #000; overflow: hidden; }
:root.chat-redesign .quick-replies-heading { display: flex; flex: 0 0 auto; justify-content: space-between; align-items: center; padding: 0 8px 12px; color: #65717d; font-size: 14px; }
:root.chat-redesign .quick-replies-heading button { background: transparent; border: 0; color: #899198; font-size: 24px; width: 32px; height: 32px; cursor: pointer; }
:root.chat-redesign .quick-replies-list { flex: 1; min-height: 0; margin: 0; overflow-y: auto; overscroll-behavior: contain; }
:root.chat-redesign .quick-replies-list button { display: block; width: 100%; padding: 14px 12px; border: 0; border-radius: 14px; background: transparent; color: #000; text-align: left; cursor: pointer; }
:root.chat-redesign .quick-replies-list button:hover, :root.chat-redesign .quick-replies-list button:focus-visible { background: #e5f1f8; }
:root.chat-redesign .quick-replies-item strong { font-size: 16px; font-weight: 600; white-space: normal; }
:root.chat-redesign .quick-replies-item span { margin-top: 5px; font-size: 14px; line-height: 1.5; color: #65717d; white-space: normal; overflow-wrap: anywhere; }
:root.chat-redesign body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-synthesis: none; -webkit-font-smoothing: antialiased; color: #000; line-height: 1.45; }
:root.chat-redesign #app { background: #f7f7f7; }
:root.chat-redesign #chats, :root.chat-redesign #thread { background: white; border-radius: 22px; overflow: hidden; }
:root.header-embed #chats { display: flex; flex-direction: column; }
:root.chat-redesign #chat-list { min-height: 0; flex: 1; overflow-y: auto; }
:root.chat-redesign .eyebrow, :root.chat-redesign .channel-mark { display: none; }
:root.chat-redesign .inbox-brand { position: relative; flex: 0 0 auto; flex-direction: row; align-items: center; padding: 24px; min-height: 84px; border: 0; }
:root.chat-redesign .inbox-brand > div:first-child { flex: 1; min-width: 0; }
:root.chat-redesign .inbox-actions { flex: 0 0 auto; margin-left: auto; }
:root.chat-redesign .inbox-brand h1 { font-size: 20px; font-weight: 600; line-height: 1.3; color: #000; }
:root.chat-redesign .search-toggle { color: #8b919a; }
:root.chat-redesign .search-toggle svg { stroke-width: 1.7; }
:root.chat-redesign .chat { padding: 17px 18px 17px 24px; gap: 12px; border: 0; border-radius: 0; min-height: 84px; }
:root.chat-redesign .chat .avatar { display: none; }
:root.chat-redesign .chat .name { font-size: 16px; font-weight: 600; line-height: 1.4; }
:root.chat-redesign .client-child { color: #626a73; font-weight: 400; margin-left: 5px; }
:root.chat-redesign .chat .last { margin-top: 5px; font-size: 16px; line-height: 24px; color: #727980; }
:root.chat-redesign .chat:has(.badge) .last { color: #242c35; font-weight: 550; }
:root.chat-redesign .chat.active { background: #e4edf8; box-shadow: inset 4px 0 #276bb7; }
:root.chat-redesign .chat .badge { flex: 0 0 11px; min-width: 11px; width: 11px; height: 11px; padding: 0; font-size: 0; border-radius: 50%; background: #246db3; align-self: center; }
:root.chat-redesign .thread-head { padding: 22px 24px; min-height: 84px; border: 0; }
:root.chat-redesign .thread-identity strong { font-size: 22px; font-weight: 600; line-height: 1.25; }
:root.chat-redesign .thread-identity { display: block; }
:root.chat-redesign .thread-identity strong { white-space: normal; }
:root.chat-redesign .thread-identity .client-parent { font-size: inherit; color: #000; }
:root.chat-redesign .thread-identity .client-child { font-size: inherit; color: #626a73; }
:root.chat-redesign #messages { padding: 16px 20px 24px; gap: 12px; }
:root.chat-redesign .msg { border: 0; border-radius: 19px; padding: 12px 15px 10px; font-size: 16px; line-height: 1.5; max-width: min(92%, 560px); background: #f7f7f7; box-shadow: none; }
:root.chat-redesign .msg.out { background: #eaf6ec; }
:root.chat-redesign .msg .time { font-size: 11px; color: #98a19b; margin-top: 8px; }
:root.chat-redesign .date-divider { color: #9b9b9b; font-size: 13px; margin: 8px 0; }
:root.chat-redesign .date-divider { justify-content: center; }
:root.chat-redesign .date-divider::before, :root.chat-redesign .date-divider::after { display: none; }
:root.chat-redesign .date-divider span { border: 0; padding: 0; background: transparent; }
:root.chat-redesign #composer { margin: 0 20px 20px; padding: 5px; border: 0; border-radius: 22px; background: #f7f7f7; grid-template-columns: 40px minmax(0, 1fr) 44px; gap: 3px; }
:root.chat-redesign #composer:has(> button[type="submit"]:disabled) { grid-template-columns: 40px minmax(0, 1fr); }
:root.chat-redesign #composer:focus-within { box-shadow: 0 0 0 2px #dce5f1; }
:root.chat-redesign #composer textarea#text { grid-column: 2; grid-row: 1; background: transparent; border: 0; border-radius: 0; min-height: 44px; max-height: 130px; padding: 10px 8px; font-size: 16px; line-height: 24px; font-weight: 400; }
:root.chat-redesign #composer textarea#text:focus, :root.chat-redesign #composer textarea#text:focus-visible { outline: none; box-shadow: none; border: 0; }
:root.chat-redesign #composer textarea#text::placeholder { color: #959da9; }
:root.chat-redesign #composer .attach, :root.chat-redesign #composer > button { grid-row: 1; color: #71767c; }
:root.chat-redesign #composer .attach { display: none; }
:root.chat-redesign #composer > .quick-replies-toggle { grid-column: 1; width: 40px; height: 44px; color: #71767c; }
:root.chat-redesign #composer > .quick-replies-toggle::before { content: "/"; width: auto; height: auto; background: none; font: 400 28px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
:root.chat-redesign #composer > button[type="submit"] { grid-column: 3; width: 44px; height: 44px; border-radius: 14px; background: #17181c; color: #fff; align-self: end; }
:root.chat-redesign #composer > button[type="submit"]:hover { background: #34383e; }
:root.chat-redesign #composer > button[type="submit"]:disabled { display: none; }
:root.chat-redesign #composer > button[type="submit"] svg { display: none; }
:root.chat-redesign #composer > button[type="submit"]::before { content: ""; width: 24px; height: 24px; background: center / 24px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 19V5m-6 6 6-6 6 6' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
:root.chat-redesign .attachment-preview { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; margin: 0 20px 10px; padding: 10px 12px; background: #f7f7f7; border-radius: 14px; }
:root.chat-redesign .attachment-preview[hidden], :root.chat-redesign .attachment-drop-target[hidden] { display: none; }
:root.chat-redesign .attachment-preview img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
:root.chat-redesign .attachment-preview div { flex: 1; min-width: 0; }
:root.chat-redesign .attachment-preview strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
:root.chat-redesign .attachment-preview span { color: #727980; font-size: 12px; }
:root.chat-redesign .attachment-preview button { border: 0; background: transparent; color: #727980; font-size: 24px; width: 36px; height: 36px; cursor: pointer; }
:root.chat-redesign .attachment-status { margin: 0 20px 10px; color: #9e3434; font-size: 13px; }
:root.chat-redesign .attachment-drop-target { position: absolute; inset: 12px; z-index: 20; display: grid; place-items: center; border: 2px dashed #276bb7; border-radius: 18px; background: rgba(244,248,253,.95); color: #276bb7; font-size: 20px; pointer-events: none; }
:root.chat-redesign .thread-actions { position: relative; margin-left: auto; }
:root.chat-redesign .thread-actions summary { list-style: none; cursor: pointer; color: #8b919a; font-size: 24px; width: 36px; text-align: center; }
:root.chat-redesign .thread-actions summary::-webkit-details-marker { display: none; }
:root.chat-redesign .thread-action-list { position: absolute; right: 0; top: 36px; z-index: 25; border: 1px solid #e8eaed; border-radius: 12px; background: white; padding: 4px; box-shadow: 0 6px 24px #0001; }
:root.chat-redesign .thread-actions button { display: block; width: 100%; white-space: nowrap; text-align: left; border: 0; border-radius: 8px; background: white; padding: 12px 16px; cursor: pointer; }
:root.chat-redesign .thread-actions button:hover { background: #f1f5fa; }
@media (min-width: 900px) {
  :root.header-embed #app { display: grid; grid-template-columns: clamp(280px, 29%, 370px) minmax(0, 1fr); gap: 12px; }
  :root.header-embed #chats, :root.header-embed #thread { position: relative; inset: auto; width: auto; height: 100%; min-width: 0; }
  :root.header-embed.thread-open #chats { display: flex; }
  :root.header-embed #thread { display: flex; }
  :root.header-embed #thread-menu { display: none; }
}
@media (max-width: 599px) {
  :root.card-mode .thread-head { min-height: 64px; padding: 16px 18px; }
  :root.card-mode .thread-identity strong { font-size: 20px; }
  :root.card-mode #messages { padding: 12px 16px 18px; }
  :root.card-mode #composer { margin: 0 16px 16px; }
  :root.card-mode .attachment-preview, :root.card-mode .attachment-status { margin-left: 16px; margin-right: 16px; }
  :root.header-embed #chats, :root.header-embed #thread { border-radius: 0; }
  :root.header-embed #messages { padding: 12px; }
  :root.header-embed #composer { margin: 0 12px 12px; }
  :root.header-embed .thread-identity strong { font-size: 18px; }
}
/* Shared archive and CRM calendar selection. */
.header-embed #chat-filter { max-width: 245px; width: 100%; border: 0; background: transparent; color: #111; font: inherit; font-size: 21px; font-weight: 600; cursor: pointer; }
.header-embed #chat-filter:focus-visible { outline: 2px solid #c9d9ee; border-radius: 8px; }
.archive-context { position: fixed; z-index: 50; padding: 14px 20px; background: #fff; color: #17191d; border: 1px solid #e4e8ef; border-radius: 14px; box-shadow: 0 4px 20px #21334a20; font: inherit; cursor: pointer; }
.archive-error { font-size: 12px; color: #ad3232; margin: 0; }
.inbox-open-tab { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 36px; border-radius: 8px; color: #8b919a; text-decoration: none; font-size: 24px; line-height: 1; }
.inbox-open-tab[hidden] { display: none; }
.inbox-open-tab:hover { color: #276bb7; background: #f1f5fa; }
.inbox-open-tab:focus-visible { outline: 2px solid #c9d9ee; outline-offset: 2px; }
:root.sidebar-embed #chats, :root.sidebar-embed #thread { border-radius: 22px; }
:root.sidebar-embed .inbox-actions { gap: 4px; }
:root.sidebar-embed .thread-identity { flex: 1; min-width: 0; }
