/* Put the status filters at the top of the middle pane in one left-aligned row. */
.shell { min-height: var(--chat-screen-height, 100dvh); }
.sidebar .sidebar-toggle { align-self: flex-end; display: grid; place-items: center; width: 32px; height: 32px; margin: -12px 0 16px; padding: 0; color: #d8e4fc; background: #1b2636; border: 1px solid #3d506a; border-radius: 7px; cursor: pointer; }
.sidebar .sidebar-toggle svg { width: 18px; height: 18px; }
.shell.sidebar-collapsed .sidebar { width: 70px; padding-inline: 9px; }
.shell.sidebar-collapsed .sidebar-toggle { align-self: center; margin-top: -12px; }
.shell.sidebar-collapsed .sidebar .logo, .shell.sidebar-collapsed .sidebar .workspace-picker, .shell.sidebar-collapsed .sidebar .account > div { display: none; }
.shell.sidebar-collapsed .sidebar nav button { justify-content: center; min-height: 45px; padding: 10px 6px; font-size: 0; gap: 0; }
.shell.sidebar-collapsed .sidebar nav button svg { width: 20px; height: 20px; flex: none; }
.shell.sidebar-collapsed .sidebar .invite-count { font-size: 10px; min-width: 15px; padding: 1px 3px; }
.shell.sidebar-collapsed .sidebar .inbox-signout { margin-inline: 0; font-size: 0; min-height: 44px; }
.shell.sidebar-collapsed .sidebar .inbox-signout::after { content: "⇥"; font-size: 23px; }
.shell.sidebar-collapsed .sidebar .account { justify-content: center; padding-inline: 0; }
.connections .bot-badge.bot-telegram { color: #7cddff; background: #163e59; }
.connections .bot-badge.bot-viber { color: #c5a4ff; background: #382354; }
.connections .bot-badge svg { width: 24px; height: 24px; }
.inbox-container .chat-inbox {
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(var(--chat-screen-height, 100dvh) - 48px);
}
.inbox-container .chat-contacts { display: contents; }
.inbox-container .chat-contacts > header {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  gap: 3px;
  padding: 10px 15px;
  border-right: 1px solid #353941;
  border-bottom: 1px solid #353941;
}
.inbox-container .chat-contacts > header h1 { margin: 0; font-size: 18px; }
.inbox-container .chat-contacts > header input { margin-top: 3px; padding: 8px 10px; }
.inbox-container .chat-contacts > nav {
  grid-column: 2 / -1;
  grid-row: 1;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  min-width: 0;
  gap: 5px;
  padding: 10px 15px;
  border-bottom: 1px solid #353941;
  overflow-x: auto;
  scrollbar-width: thin;
}
.inbox-container .chat-contacts > nav button {
  flex: none;
  text-align: center;
  white-space: nowrap;
  font-size: 14px;
  padding: 8px 11px;
  cursor: pointer;
}
.inbox-container .chat-contacts > nav button:focus-visible { outline: 2px solid #6ba5ff; outline-offset: 2px; }
.inbox-container .chat-contacts > nav button[aria-pressed="true"] { color: #fff; background: #2d4d87; }
.sidebar .inbox-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.sidebar .inbox-icon .inbox-unread-badge { position: absolute; top: -12px; right: -15px; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 999px; background: #f43f56; color: white; font-size: 11px; line-height: 1; font-weight: 700; box-shadow: 0 0 0 2px #0b0e14; }
.inbox-container .chat-contact-meta { display: grid; justify-items: end; gap: 6px; flex: none; }
.inbox-container .chat-unread-badge { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #f43f56; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.inbox-container .chat-contact-list .contact-mainline { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 2px; min-width: 0; }
.inbox-container .chat-contact-list .contact-mainline strong { flex: none; }
.inbox-container .chat-contact-list .contact-phone { display: block; min-width: 0; overflow-wrap: anywhere; color: #fff; font-size: 18px; font-weight: 700; line-height: 1.25; }
.inbox-container .chat-contact-list .has-phone .contact-mainline strong { max-width: 40%; font-size: 17px; }
.inbox-container .chat-contact-list .has-phone .chat-contact-meta time { display: none; }
.inbox-container .chat-contacts > nav .nav-profile { display: flex; flex: none; align-items: center; gap: 12px; margin-left: auto; padding: 4px 8px; min-width: 0; max-width: 320px; color: #eef3fa; }
.inbox-container .nav-profile .avatar { flex: none; width: 54px; height: 54px; font-size: 20px; }
.inbox-container .nav-profile span:last-child { min-width: 0; }
.inbox-container .nav-profile strong, .inbox-container .nav-profile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-container .nav-profile strong { font-size: 17px; }
.inbox-container .nav-profile small { color: #afbed0; font-size: 13px; }
.inbox-container .chat-thread .chat-status-action { padding: 8px 14px; border: 1px solid #4b6698; border-radius: 8px; color: #eef3ff; background: #273b62; font: inherit; font-size: 14px; cursor: pointer; }
.inbox-container .chat-thread .chat-status-action:disabled { opacity: .55; cursor: not-allowed; }
.inbox-container .chat-thread .chat-status-action:focus-visible { outline: 2px solid #8db9ff; outline-offset: 2px; }
.inbox-container .inbox-switch { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
.inbox-container .inbox-switch button { flex: none; }
.inbox-container .channel-pending { display: grid; align-content: center; justify-items: center; gap: 10px; min-height: calc(var(--chat-screen-height, 100dvh) - 48px); padding: 30px; color: #e9edf5; background: #101217; text-align: center; }
.inbox-container .channel-pending h2 { margin: 0; font-size: 21px; }
.inbox-container .channel-pending p { margin: 0; color: #aebbd0; }
.inbox-container .chat-contact-list {
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
  border-right: 1px solid #353941;
}
.inbox-container .chat-thread { grid-column: 2; grid-row: 2; min-height: 0; }
.inbox-container .chat-details { grid-column: 3; grid-row: 2; }
.chat-contacts-resizer { display: none; }
.inbox-container .chat-thread > form > button:last-child { margin-left: auto; }
.sidebar .inbox-signout { flex: none; align-self: stretch; margin: auto 14px 12px; padding: 9px 12px; color: #aabbd1; background: transparent; border: 1px solid #354258; border-radius: 8px; font-family: inherit; font-size: 16px; font-weight: 400; cursor: pointer; }
.sidebar .inbox-signout:hover { color: #fff; background: #202531; }
.sidebar .inbox-signout:focus-visible { outline: 2px solid #8db9ff; outline-offset: 2px; }
.sidebar .account { margin-top: 0; }
.admin-settings .cache-settings { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; max-width: 700px; margin: 0 0 22px; padding: 20px 23px; color: #edf1f8; background: #161c26; border: 1px solid #343e50; border-radius: 12px; }
.admin-settings .cache-settings h2 { margin: 0 0 6px; font-size: 18px; }
.admin-settings .cache-settings p { margin: 0; color: #b4c0d2; font-size: 14px; line-height: 1.45; }
.admin-settings .cache-settings button { flex: none; padding: 10px 16px; color: #fff; background: #2563eb; border: 0; border-radius: 7px; font: inherit; font-weight: 600; cursor: pointer; }
.admin-settings .cache-settings button:hover:not(:disabled) { background: #1d55cf; }
.admin-settings .cache-settings button:disabled { opacity: .6; cursor: wait; }
.admin-settings .cache-settings button:focus-visible { outline: 2px solid #8db9ff; outline-offset: 2px; }
.admin-settings .cache-settings .cache-error { flex: 0 0 100%; color: #ffb4b4; }
.inbox-container .chat-message-list { min-height: 0; overflow-y: scroll; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #586476 #161a22; }
.inbox-container .chat-details { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #586476 #161a22; }
.inbox-container .chat-message-list::-webkit-scrollbar, .inbox-container .chat-details::-webkit-scrollbar { width: 9px; }
.inbox-container .chat-message-list::-webkit-scrollbar-thumb, .inbox-container .chat-details::-webkit-scrollbar-thumb { background: #586476; border-radius: 9px; }
.chat-detail-resizer { display: none; }
@media (min-width: 1200px) {
  .inbox-container .chat-inbox { grid-template-columns: minmax(220px, var(--contacts-width, 300px)) 8px minmax(260px, 1fr) 8px minmax(240px, var(--details-width, 335px)); }
  .inbox-container .chat-contacts > nav { grid-column: 3 / -1; }
  .inbox-container .chat-contacts-resizer { grid-column: 2; grid-row: 2; display: block; position: relative; z-index: 2; cursor: col-resize; touch-action: none; background: #252b36; }
  .inbox-container .chat-contacts-resizer:hover, .inbox-container .chat-contacts-resizer:focus-visible, .inbox-container .chat-contacts-resizer[data-dragging="true"] { background: #558bee; outline: none; }
  .inbox-container .chat-thread { grid-column: 3; }
  .inbox-container .chat-detail-resizer { grid-column: 4; grid-row: 2; display: block; position: relative; z-index: 2; cursor: col-resize; touch-action: none; background: #252b36; }
  .inbox-container .chat-detail-resizer:hover, .inbox-container .chat-detail-resizer:focus-visible, .inbox-container .chat-detail-resizer[data-dragging="true"] { background: #558bee; outline: none; }
  .inbox-container .chat-details { grid-column: 5; grid-row: 2; }
}
@media (min-width: 701px) and (max-width: 1199px) {
  .inbox-container .chat-inbox { grid-template-columns: 240px minmax(270px, 1fr); grid-template-rows: auto minmax(350px, 1fr) auto; height: auto; }
  .inbox-container .chat-details { grid-column: 2; grid-row: 3; max-height: none; }
}
.website-setup .site-number { flex: none; width: 80px; color: #aebdd2; font-size: 14px; }
.chat-thread .photo-input { display: none; }
.chat-thread form .photo-picker { width: 43px; min-height: 42px; display: grid; place-items: center; padding: 0; background: #273b62; }
.chat-thread form .photo-picker svg { width: 21px; height: 21px; }
.chat-thread form:has(.photo-preview) { flex-wrap: wrap; }
.chat-thread .photo-preview { flex: 0 0 100%; display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.chat-thread .photo-preview img { display: block; max-width: min(220px, 55vw); max-height: 220px; width: auto; height: auto; object-fit: contain; border-radius: 10px; }
.chat-thread form .photo-preview .photo-remove { flex: none; width: 33px; height: 33px; padding: 0; border-radius: 50%; background: #2e394a; color: #fff; font-size: 23px; line-height: 1; }
.chat-thread form .photo-preview .photo-remove:hover { background: #b53737; }
.chat-thread .emoji-menu { flex: none; align-self: center; position: relative; }
.chat-thread .emoji-menu summary { cursor: pointer; list-style: none; border: 1px solid #42516a; border-radius: 8px; padding: 9px; line-height: 1.2; font-size: 20px; }
.chat-thread .emoji-menu summary::-webkit-details-marker { display: none; }
.chat-thread .emoji-menu summary:focus-visible { outline: 2px solid #8db9ff; }
.chat-thread .emoji-options { position: absolute; bottom: calc(100% + 9px); left: 0; z-index: 6; width: min(520px, calc(100vw - 24px)); padding: 6px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; overflow: visible; border: 1px solid #465064; border-radius: 9px; background: #202836; box-shadow: 0 12px 28px #0008; }
.chat-thread form .emoji-options button { min-width: 0; padding: 5px 0; background: transparent; font-size: clamp(16px, 2vw, 21px); }
.chat-thread form .emoji-options button:hover { background: #34415a; }
.chat-message-list, .chat-thread form input { font-family: system-ui, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.chat-message-list img { display: block; max-width: min(320px, 100%); max-height: 350px; border-radius: 10px; object-fit: contain; }
.inbox-container .chat-message-list > div.photo-message { background: transparent; padding: 0; border-radius: 10px; overflow: hidden; }
.chat-message-list > .photo-message small { padding: 0 0 5px 2px; }
.chat-message-list > .photo-message img { width: auto; height: auto; border-radius: 10px; }
.chat-thread .photo-drop-overlay { position: absolute; inset: 8px; z-index: 4; display: grid; place-items: center; pointer-events: none; background: #14233cdd; border: 3px dashed #6ca0f8; border-radius: 12px; color: #eff5ff; font-size: 18px; font-weight: 600; }
.chat-details .quick-replies { border-top: 1px solid #343a45; padding: 17px; }
.chat-details .quick-replies h3 { font-size: 16px; margin: 0 0 12px; }
.chat-details .standard-replies-open { width: 100%; padding: 11px 12px; display: flex; align-items: center; justify-content: space-between; color: #ecf3ff; background: #263b63; border: 1px solid #4b6698; border-radius: 8px; text-align: left; cursor: pointer; }
.chat-details .standard-replies-open span { color: #c9dbff; }
.chat-details .quick-replies > p { color: #a9bacd; font-size: 13px; margin: 10px 0 0; }
.chat-details .quick-replies-inline { margin-top: 13px; background: #151920; border: 1px solid #353d49; border-radius: 5px; overflow: hidden; }
.chat-details .quick-replies-inline .standard-reply-item { min-height: 82px; }
.chat-details .quick-replies-inline .standard-reply-content { min-height: 82px; padding: 11px 2px 11px 10px; }
.chat-details .quick-replies-inline .standard-reply-title { font-size: 15px; }
.chat-details .quick-replies-inline .standard-reply-preview { font-size: 12px; }
.chat-details .quick-replies-inline .standard-star { font-size: 22px; padding-inline: 2px; }
.chat-details .quick-replies-inline .standard-edit { font-size: 20px; padding: 8px 7px 8px 2px; }
.chat-details .quick-replies-inline button:focus-visible { outline: 2px solid #8db9ff; outline-offset: -2px; }
.standard-replies-backdrop { position: fixed; inset: 0; z-index: 999; background: #000b; }
.standard-replies-drawer { position: fixed; z-index: 1000; top: 0; right: 0; bottom: 0; width: min(516px, 100vw); display: flex; flex-direction: column; overflow: hidden; background: #101217; color: #edf1f7; color-scheme: dark; box-shadow: -16px 0 45px #0009; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.standard-replies-drawer * { box-sizing: border-box; }
.standard-replies-drawer button, .standard-replies-drawer input, .standard-replies-drawer textarea, .standard-replies-drawer select { font: inherit; }
.standard-replies-header { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 23px; flex: none; }
.standard-replies-header strong { flex: 1; font-size: 17px; font-weight: 700; }
.standard-replies-drawer .standard-close, .standard-replies-drawer .standard-back { background: transparent; border: 0; color: #e9edf5; padding: 4px; cursor: pointer; font-size: 30px; line-height: 1; }
.standard-replies-drawer .standard-back { font-size: 34px; }
.standard-replies-tools { display: grid; gap: 20px; padding: 7px 23px 20px; flex: none; }
.standard-replies-tools > input { width: 100%; min-width: 0; height: 41px; background: #1a1f27; border: 1px solid #465064; border-radius: 2px; padding: 9px 11px; color: #f0f4fa; font-size: 16px; outline-color: #04bc5b; }
.standard-replies-tools > input::placeholder { color: #98a4b5; }
.standard-selects { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.standard-selects select { max-width: 50%; min-width: 0; height: 47px; padding: 0 35px 0 15px; color: #e9edf5; background: #1a1f27; border: 1px solid #465064; border-radius: 6px; font-size: 17px; cursor: pointer; }
.standard-replies-scroll { margin: 0 16px 0 23px; border: 1px solid #353d49; border-radius: 3px; background: #151920; overflow-y: auto; flex: 1; min-height: 0; scrollbar-color: #485260 #151920; }
.standard-reply-item { display: flex; align-items: center; min-height: 101px; border-bottom: 1px solid #353d49; }
.standard-reply-item:last-child { border-bottom: 0; }
.standard-reply-content { flex: 1; min-width: 0; min-height: 100px; padding: 16px 9px 16px 27px; text-align: left; color: #eef2f8; background: transparent; border: 0; cursor: pointer; }
.standard-reply-content:not(:disabled):hover { background: #202733; }
.standard-reply-content:disabled { cursor: default; opacity: 1; }
.standard-reply-title, .standard-reply-preview { display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.standard-reply-title { font-size: 20px; line-height: 1.35; }
.standard-reply-preview { margin-top: 4px; color: #aab5c5; font-size: 16px; line-height: 1.35; }
.standard-replies-drawer .standard-star, .standard-replies-drawer .standard-edit, .quick-replies-inline .standard-star, .quick-replies-inline .standard-edit { flex: none; border: 0; background: transparent; color: #aeb8c7; cursor: pointer; padding: 8px 4px; font-size: 27px; line-height: 1; }
.standard-replies-drawer .standard-star.active, .quick-replies-inline .standard-star.active { color: #00c84f; }
.standard-replies-drawer .standard-edit { font-size: 22px; padding: 8px 14px 8px 4px; }
.standard-replies-footer { flex: none; padding: 20px 16px 32px 23px; background: #101217; }
.standard-replies-drawer .standard-primary { width: 100%; min-height: 52px; background: #2563eb; color: #fff; border: 0; border-radius: 5px; padding: 11px 15px; font-size: 17px; font-weight: 700; cursor: pointer; }
.standard-replies-drawer .standard-primary:disabled { opacity: .55; cursor: not-allowed; }
.standard-empty { color: #a9b5c5; padding: 25px; }
.standard-error { color: #ffb4b4; padding: 10px 23px; font-size: 14px; }
.standard-editor { display: flex; flex-direction: column; gap: 22px; padding: 23px; overflow-y: auto; }
.standard-editor label { display: grid; gap: 9px; color: #e9edf5; font-size: 15px; font-weight: 600; }
.standard-editor input, .standard-editor textarea { width: 100%; background: #1a1f27; color: #f0f4fa; border: 1px solid #465064; border-radius: 5px; padding: 11px 12px; font-size: 16px; font-weight: 400; resize: vertical; }
.standard-editor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.standard-editor-actions .standard-primary { width: auto; margin-left: auto; }
.standard-editor-actions .standard-delete, .standard-editor-actions .standard-cancel { background: #222935; border: 1px solid #465064; border-radius: 5px; color: #e6ecf5; padding: 12px; cursor: pointer; }
.standard-editor-actions .standard-delete { color: #ffaaa5; }
.standard-replies-drawer button:focus-visible, .standard-replies-drawer input:focus-visible, .standard-replies-drawer select:focus-visible, .standard-replies-drawer textarea:focus-visible { outline: 2px solid #00ad52; outline-offset: 2px; }
@media (max-width: 550px) {
  .standard-replies-header { padding-inline: 16px; }
  .standard-replies-tools { padding-inline: 16px; }
  .standard-replies-scroll { margin-inline: 16px; }
  .standard-reply-content { padding-left: 15px; }
  .standard-reply-title { font-size: 17px; }
  .standard-reply-preview { font-size: 14px; }
  .standard-replies-footer { padding-inline: 16px; padding-bottom: 16px; }
  .standard-selects select { font-size: 14px; }
}

@media (max-width: 1100px) and (min-width: 701px) {
  .inbox-container .chat-inbox { grid-template-rows: auto minmax(350px, 1fr) auto; height: auto; }
  .inbox-container .chat-details { grid-column: 2; grid-row: 3; max-height: none; }
  .inbox-container .chat-contacts > nav .nav-profile { width: auto; max-width: 220px; margin-left: auto; }
}
@media (max-width: 700px) {
  .inbox-container .chat-inbox { display: flex; flex-direction: column; height: auto; }
  .inbox-container .chat-contacts > header { order: 0; border-right: 0; }
  .inbox-container .chat-contacts > nav { order: 2; gap: 4px; padding: 8px 12px; }
  .inbox-container .chat-contacts > nav button { padding: 8px 10px; }
  .inbox-container .chat-contacts > nav .nav-profile { display: none; }
  .inbox-container .chat-contact-list { order: 1; max-height: 240px; overflow: auto; border-right: 0; border-bottom: 1px solid #353941; }
  .inbox-container .chat-thread { order: 3; min-height: 480px; }
  .inbox-container .chat-details { order: 4; }
}
@media (max-width: 800px) {
  .sidebar .inbox-signout { margin-inline: 0; font-size: 0; min-height: 44px; }
  .sidebar .inbox-signout::after { content: "⇥"; font-size: 24px; }
}

.sidebar .workspace-picker { padding: 14px 12px 5px; display: grid; gap: 7px; color: #aebdd5; }
.sidebar .workspace-picker label { font-size: 11px; font-weight: 750; letter-spacing: .11em; }
.sidebar .workspace-picker select { width: 100%; min-width: 0; border: 1px solid #42516a; background: #1c2535; color: #eef4ff; border-radius: 8px; padding: 9px 10px; font: inherit; }
.sidebar .workspace-picker small { color: #ffb3b3; }
.sidebar .invite-count { margin-left: auto; min-width: 21px; padding: 2px 6px; border-radius: 999px; color: #fff; background: #315a9b; font-size: 12px; text-align: center; }
.workspace-sharing { margin: 28px 0; padding: 22px; background: #171d28; border: 1px solid #3b4860; border-radius: 12px; color: #ecf2fa; }
.workspace-sharing h2 { font-size: 19px; margin: 0 0 9px; }
.workspace-sharing p { color: #aebdd5; }
.workspace-sharing form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 9px; }
.workspace-sharing form textarea { flex: 1 1 235px; min-height: 90px; padding: 11px 12px; resize: vertical; border-radius: 7px; background: #111720; border: 1px solid #475776; color: #fff; font: inherit; }
.workspace-sharing form textarea::placeholder { color: #91a1b9; }
.workspace-sharing form button { flex: none; min-height: 45px; margin-left: auto; }
.workspace-sharing .share-help { margin: 10px 0 0; font-size: 13px; line-height: 1.4; }
.workspace-sharing .share-success { margin: 10px 0 0; color: #82dcb0; font-size: 14px; }
.workspace-sharing .chat-error { color: #ffb4b4; }
.workspace-sharing button, .team-role-controls button { padding: 10px 13px; background: #2563eb; border: 1px solid #4177e5; border-radius: 7px; color: #fff; cursor: pointer; }
.workspace-sharing button.secondary { background: #253044; border-color: #526078; }
.workspace-sharing button:disabled, .team-role-controls button:disabled { opacity: .5; cursor: default; }
.workspace-partners { margin-top: 17px; }
.workspace-partners h3 { margin: 0 0 8px; font-size: 16px; color: #f0f5ff; }
.workspace-partners > div { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 15px; padding: 10px 0; border-top: 1px solid #364358; }
.workspace-partners > div > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.workspace-partners > div small { display: block; margin-top: 4px; color: #aebdd5; font-size: 13px; }
.workspace-partners .invite-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto; }
.workspace-partners .invite-actions label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.workspace-partners .invite-actions input { width: 68px; padding: 9px 6px; color: #fff; background: #111720; border: 1px solid #526078; border-radius: 7px; font: inherit; }
.team-role-controls { display: flex; align-items: end; gap: 8px; }
.team-role-controls label { display: grid; gap: 6px; font-size: 13px; color: #b7c9e3; }
.team-role-controls select { min-width: 105px; padding: 9px 10px; background: #172031; color: #fff; border: 1px solid #465776; border-radius: 7px; }
.admin-settings .team-actions button.team-delete, .admin-settings .team-actions button.team-delete-final { background: #923843; color: #fff; border: 1px solid #c0606a; }
.team-delete-confirm { flex: 0 0 100%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 12px; border: 1px solid #a34b59; border-radius: 8px; background: #281d26; }
.admin-settings .team-access .team-delete-confirm p { flex: 0 0 100%; margin: 0; color: #f1c5cb; font-size: 13px; }
.inbox-invitations { flex: none; max-height: min(40vh, 280px); overflow-y: auto; padding: 0 16px; background: #131a26; }
.inbox-invitations .workspace-sharing { margin: 10px 0; padding: 14px; }
.inbox-container:has(.inbox-invitations) { height: var(--chat-screen-height, 100dvh); }
.inbox-container:has(.inbox-invitations) .chat-inbox { height: auto; min-height: 0; flex: 1; }
.chat-thread form { position: relative; align-items: center; }
.chat-thread form .photo-picker, .chat-thread .emoji-menu summary { width: 44px; height: 44px; min-width: 44px; min-height: 44px; box-sizing: border-box; display: grid; place-items: center; padding: 0; }
.chat-thread form .photo-picker, .chat-thread form > .emoji-menu { flex: 0 0 44px; align-self: center; }
.chat-thread form .photo-picker svg, .chat-thread .text-emoji-menu summary svg { width: 22px; height: 22px; }
.chat-thread .sticker-menu summary { font-size: 22px; line-height: 1; }
.chat-thread form > input:not([type="file"]) { flex: 1 1 auto; min-width: 0; }
.chat-thread form > textarea.message-multiline-input { flex: 1 1 auto; min-width: 0; height: 56px; min-height: 56px; max-height: 240px; padding: 10px 12px; border: 1px solid #465167; border-radius: 8px; background: #171d27; color: #e9edf5; font: inherit; line-height: 1.35; white-space: pre-wrap; overflow-y: auto; resize: none; box-sizing: border-box; }
.chat-thread .sticker-menu { position: static; }
.chat-thread .text-emoji-menu { position: static; }
.chat-thread .text-emoji-menu summary { color: #fff; background: #2364e8; border-color: #4177e5; }
.chat-thread .text-emoji-options { left: 50%; transform: translateX(-50%); width: min(440px, calc(100% - 24px)); max-height: min(55vh, 330px); overflow-y: auto; align-content: start; grid-template-columns: repeat(10, minmax(0, 1fr)); padding: 10px; gap: 3px; }
.chat-thread form .text-emoji-options button { display: grid; place-items: center; min-height: 38px; padding: 4px; border-radius: 6px; font-size: 25px; line-height: 1; }
.chat-thread .sticker-options { left: 50%; transform: translateX(-50%); width: min(490px, calc(100% - 24px)); max-height: min(66vh, 630px); overflow-y: auto; align-content: start; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 10px; gap: 7px; }
.chat-thread form .sticker-options button { padding: 4px; border-radius: 7px; }
.chat-thread form .sticker-options img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }
.chat-thread form .sticker-options button:disabled { opacity: .45; }
.chat-thread .sticker-slot { min-width: 0; border-radius: 7px; background: #151d2b; overflow: hidden; }
.chat-thread form .sticker-slot .sticker-select { width: 100%; background: #fff; padding: 3px; }
.chat-thread .sticker-slot .sticker-empty { display: grid; place-items: center; aspect-ratio: 1; color: #aebbd0; font-size: 13px; }
.chat-thread .sticker-slot-actions { display: flex; align-items: stretch; gap: 2px; padding: 3px; }
.chat-thread .sticker-slot-actions label, .chat-thread form .sticker-slot-actions button { flex: 1; min-width: 0; cursor: pointer; background: #304b79; color: #fff; text-align: center; font-size: 11px; line-height: 1.4; border-radius: 4px; padding: 4px 2px; }
.chat-thread .sticker-slot-actions label { position: relative; }
.chat-thread .sticker-slot-actions input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.chat-thread .sticker-slot-actions label:focus-within, .chat-thread form .sticker-slot-actions button:focus-visible { outline: 2px solid #a4c6ff; }
.chat-thread form .sticker-options .sticker-manage-toggle { grid-column: 1 / -1; justify-self: end; background: #304b79; color: #fff; padding: 6px 9px; font-size: 13px; }
.chat-thread .sticker-options .sticker-error { grid-column: 1 / -1; margin: 0; color: #ffb4b4; font-size: 12px; }
.chat-message-list .photo-message a, .chat-message-list .photo-message .chat-photo-open { display: block; cursor: zoom-in; }
.chat-message-list .photo-message .chat-photo-open { padding: 0; border: 0; border-radius: 10px; background: transparent; }
.chat-message-list .photo-message img { max-width: min(360px, 100%); max-height: 360px; image-rendering: auto; }
.chat-thread .chat-photo-viewer { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 24px; background: #090d16ed; }
.chat-thread .photo-viewer-content { position: relative; max-width: 100%; max-height: 100%; }
.chat-thread .photo-viewer-content img { display: block; max-width: 100%; max-height: calc(var(--chat-screen-height, 100dvh) - 160px); width: auto; height: auto; object-fit: contain; border-radius: 10px; }
.chat-thread .photo-viewer-close { position: absolute; right: -12px; top: -14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #fff; color: #152034; font-size: 25px; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px #0008; }
.chat-message-list img.message-sticker { width: auto; max-width: 180px; max-height: 180px; height: auto; object-fit: contain; }
.inbox-container .chat-message-list { overflow-y: auto; scrollbar-width: thin; }
.inbox-container .chat-thread { overflow: hidden; }
.inbox-container .chat-thread > header, .inbox-container .chat-thread > form { flex: none; }
.inbox-container .chat-details { scrollbar-width: none; }
.inbox-container .chat-details::-webkit-scrollbar { display: none; }
.inbox-container .channel-pending a { color: #8eb8ff; text-decoration: underline; }
.inbox-container .bot-setup { gap: 14px; padding: 24px; }
.inbox-container .bot-setup > p { max-width: 490px; line-height: 1.5; }
.inbox-container .bot-setup form { display: grid; gap: 10px; width: min(440px,100%); text-align: left; }
.inbox-container .bot-setup form label { font-weight: 700; }
.inbox-container .bot-setup form input { width: 100%; min-width: 0; padding: 12px; color: white; background: #151c29; border: 1px solid #536581; border-radius: 8px; font: inherit; }
.inbox-container .bot-setup form button, .bot-connection-details button { padding: 10px 14px; color: white; background: #2563eb; border: 1px solid #4177e5; border-radius: 8px; cursor: pointer; font: inherit; }
.inbox-container .bot-setup form button:disabled, .bot-connection-details button:disabled { opacity: .5; cursor: default; }
.inbox-container .bot-setup .bot-hint { font-size: 13px; }
.inbox-container .bot-setup .chat-error { color: #ffb4b4; }
.inbox-container .bot-connection-details { padding: 15px 3px; border-top: 1px solid #37465c; border-bottom: 1px solid #37465c; display: grid; gap: 9px; overflow-wrap: anywhere; }
.inbox-container .bot-connection-details h3, .inbox-container .bot-connection-details p { margin: 0; }
.inbox-container .bot-connection-details small { color: #aebbd0; }
.inbox-container .bot-connection-details button.bot-disconnect { background: #443039; border-color: #805160; }
.inbox-container .bot-connection-details .bot-callback { font-size: 11px; word-break: break-all; }
.inbox-container .bot-setup .bot-add-back { padding: 9px 15px; color: #c6d8fb; border: 1px solid #536581; border-radius: 8px; background: #151c29; cursor: pointer; }
.inbox-container .bot-connection-picker { display: grid; gap: 7px; padding: 13px 14px; border-bottom: 1px solid #364357; }
.inbox-container .bot-connection-picker label { color: #b8c6df; font-size: 12px; font-weight: 700; }
.inbox-container .bot-connection-picker select { min-width: 0; width: 100%; padding: 9px; color: #fff; border: 1px solid #536581; border-radius: 8px; background: #151c29; font: inherit; }
.inbox-container .bot-connection-picker button { padding: 8px 10px; color: #fff; border: 1px solid #4177e5; border-radius: 8px; background: #2563eb; cursor: pointer; font: inherit; }
.inbox-container .bot-inbox .chat-contacts { display: flex; flex-direction: column; grid-column: 1; grid-row: 1 / -1; min-height: 0; }
.inbox-container .bot-inbox .chat-contacts > header { grid-column: auto; grid-row: auto; }
.inbox-container .bot-inbox .chat-contacts > nav { grid-column: auto; grid-row: auto; flex-wrap: wrap; }
.inbox-container .bot-inbox .chat-contact-list { grid-column: auto; grid-row: auto; flex: 1; overflow-y: auto; }
.inbox-container .bot-inbox .chat-thread { grid-row: 1 / -1; }
.inbox-container .bot-inbox .chat-details { grid-row: 1 / -1; }
@media (max-width: 800px) { .inbox-container .bot-inbox .chat-contacts { flex: none; } }
.connections .bot-badge { background: #26589e; color: #fff; font-weight: 800; }
/* Match the login card and page to the supplied reference. */
.login-screen { background-color: #0c111b; }
.login-card { background-color: #161e2b; }
.sidebar { background-color: #000; }
.login-card .login-submit { display: block; max-width: 400px; margin-inline: auto; }
.login-card .google-signin { width: 100%; max-width: 400px; margin: 12px auto; }
.login-card .google-signin > div:first-child { display: flex; justify-content: center; min-height: 48px; }
.sidebar .logo { justify-content: center; margin: 0 0 22px; padding: 4px; border-radius: 12px; background: #000; overflow: hidden; }
.sidebar .logo img { display: block; width: 100%; height: auto; }
.login-card .login-brand { display: flex; justify-content: center; min-height: 119px; padding: 4px; border-radius: 12px; background: #000; overflow: hidden; }
.login-card .login-brand img { display: block; width: min(100%, 270px); height: auto; }
@media (max-width: 800px) {
  .sidebar .logo { position: relative; width: 52px; height: 46px; flex: none; margin-bottom: 22px; padding: 0; }
  .sidebar .logo img { position: absolute; top: -4px; left: -77px; width: 206px; max-width: none; }
}
@media (min-width: 1200px) {
  body:has(.inbox-container) { overflow: hidden; }
  .shell:has(.inbox-container) { height: var(--chat-screen-height, 100dvh); min-height: 0; overflow: hidden; }
  .shell:has(.inbox-container) .sidebar { min-height: 0; overflow-y: auto; }
  .inbox-container .chat-inbox { min-height: 0; }
}
@media (max-width: 800px) { .sidebar .workspace-picker { max-width: 200px; } }

/* Keep message content visible when a long conversation overflows.
   Photo bubbles use overflow:hidden, so their automatic flex minimum is zero. */
.inbox-container .chat-message-list > div { flex: 0 0 auto; }
.inbox-container .chat-thread > header,
.inbox-container .chat-thread > form { flex-shrink: 0; }
