/* The chat island owns its DOM; shared navigation remains SSR + htmx. */
.admin-main--chat {
  height: 100dvh;
  min-height: 0;
}
.admin-content--chat {
  display: flex;
  padding: 0 24px 24px;
  min-height: 0;
  max-width: none;
}
.chat-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 0;
}
.chat-page__heading {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  flex-shrink: 0;
}
.chat-page__title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-page__mark {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 10px;
  background: #e2eee4;
  color: #31714b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: -0.4px;
}
.chat-page__title {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: 0.5px;
}
.chat-root {
  flex: 1;
  min-height: 0;
}
.chat-loading {
  padding: 40px;
  color: var(--admin-muted);
}
.chat-recovery {
  max-height: min(180px, 30dvh);
  flex-shrink: 0;
  overflow-y: auto;
  padding: 12px 18px;
  background: #fbf3e5;
  color: #8f713d;
  font-size: 11px;
}
.chat-workspace {
  position: relative;
  display: flex;
  height: 100%;
  min-width: 0;
  border: 1px solid #dfe6df;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 3px 12px #233c2d03;
}
.chat-icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}
.chat-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #528164;
}
.chat-list {
  display: flex;
  flex-direction: column;
  width: 285px;
  flex-shrink: 0;
  min-height: 0;
  border-right: 1px solid var(--admin-line);
  background: #fff;
}
.chat-list__heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 18px 18px;
  gap: 8px;
}
.chat-list__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 650;
}
.chat-list__count {
  display: grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 6px;
  background: #eaf0e8;
  color: #426449;
  font-size: 11px;
}
.chat-list__channel {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #6b786c;
  font-size: 10px;
}
.chat-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 15px;
  padding: 0 11px;
  border: 1px solid #e8ece6;
  border-radius: 7px;
  background: #f8faf7;
  color: #81917e;
}
.chat-search__input {
  height: 38px;
  width: 100%;
  min-width: 0;
  outline-offset: 2px;
  font-size: 12px;
  background: transparent;
  color: var(--admin-ink);
}
.chat-search:focus-within {
  border-color: #7a9f85;
}
.chat-filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 0 16px 13px;
  border-bottom: 1px solid var(--admin-line);
}
.chat-filter {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 7px 0;
  border-radius: 6px;
  color: #738071;
  font-size: 11px;
  cursor: pointer;
}
.chat-filter:hover {
  background: #f5f7f2;
}
.chat-filter[aria-pressed="true"] {
  background: #eaf0e7;
  color: #345e3e;
  font-weight: 650;
}
.chat-filter__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #568260;
}
.chat-list__sort {
  display: flex;
  justify-content: space-between;
  padding: 11px 19px;
  font-size: 10px;
  color: #7c8778;
}
.chat-list__items {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.chat-contact {
  position: relative;
  display: flex;
  width: 100%;
  padding: 18px 16px;
  gap: 10px;
  text-align: left;
  border-bottom: 1px solid #eef1ec;
  border-left: 3px solid transparent;
  cursor: pointer;
}
.chat-contact:hover {
  background: #f7f9f4;
}
.chat-contact.is-selected {
  background: #eef4eb;
  border-left-color: #497952;
}
.chat-contact__body {
  flex: 1;
  min-width: 0;
}
.chat-contact__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
}
.chat-contact__name {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.25px;
}
.chat-contact__suffix {
  margin-left: 4px;
  font-size: 10px;
  color: #6e7c69;
  font-weight: 400;
}
.chat-contact__time {
  color: #798775;
  font-size: 10px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.chat-contact__car {
  display: block;
  color: #60745e;
  font-size: 10px;
  margin-top: 3px;
}
.chat-contact__preview {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #6c7968;
  font-size: 12px;
  margin-top: 7px;
}
.chat-contact__bottom {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 21px;
  margin-top: 9px;
}
.chat-contact__tag {
  padding: 1px 5px;
  background: #f3f5ef;
  color: #72806a;
  border-radius: 4px;
  font-size: 9px;
}
.chat-contact__tag--unassigned {
  color: #98702c;
  background: #fbf4e5;
}
.chat-contact__tag--blocked {
  color: #a45a3a;
  background: #f8ece8;
}
.chat-contact__tag--scheduled {
  color: #376e4a;
  background: #e7f1ea;
}
.chat-contact__unread {
  display: grid;
  place-items: center;
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 50%;
  background: #58835c;
  color: white;
  font-size: 10px;
}
.chat-contact__warning {
  margin-left: auto;
  color: #ad743b;
}
.chat-contact__warning .chat-icon {
  width: 13px;
  height: 13px;
}
.chat-list__footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 13px;
  border-top: 1px solid var(--admin-line);
  font-size: 10px;
  color: #7c8576;
}
.chat-list__footer .chat-icon {
  width: 13px;
  height: 13px;
}
.chat-avatar {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
  background: #dfe9dc;
  color: #68805d;
}
.chat-avatar--sage {
  background: #e1eadc;
  color: #59764e;
}
.chat-avatar--sand {
  background: #f0e7d9;
  color: #937954;
}
.chat-avatar--blue {
  background: #e2eaf0;
  color: #617f98;
}
.chat-avatar--rose {
  background: #f0e3e0;
  color: #9a7168;
}
.chat-avatar--small {
  width: 36px;
  height: 36px;
}
.chat-thread {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: #fafbf8;
}
.chat-thread__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 17px 23px;
  min-height: 77px;
  background: white;
  border-bottom: 1px solid var(--admin-line);
  flex-shrink: 0;
}
.chat-thread__identity {
  min-width: 0;
  flex: 1;
}
.chat-thread__name {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.5px;
}
.chat-thread__suffix {
  color: #788373;
  font-size: 11px;
  font-weight: 400;
  margin-left: 5px;
}
.chat-thread__subject {
  font-size: 10px;
  color: #7c8776;
  margin-top: 2px;
}
.chat-thread__line-name {
  font-size: 10px;
  color: #7c8776;
  margin-top: 2px;
}
.chat-thread__follow {
  font-size: 10px;
  color: #8a8068;
  margin-top: 2px;
}
.chat-thread__follow.is-blocked {
  color: #a45a3a;
}
.chat-resolve {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #dce5d6;
  border-radius: 6px;
  font-size: 11px;
  color: #5d7553;
  background: #fff;
  cursor: pointer;
  white-space: nowrap;
}
.chat-resolve:hover {
  background: #edf3e8;
  border-color: #b4c8a9;
}
.chat-resolve.is-complete {
  background: #eaf2e6;
}
.chat-resolve .chat-icon {
  width: 14px;
  height: 14px;
}
.chat-icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  color: #6c7d63;
  cursor: pointer;
  flex-shrink: 0;
}
.chat-icon-button:hover {
  background: #ecf2e7;
}
.chat-thread__back {
  display: none;
}
.chat-thread__context-wrap {
  position: relative;
  flex-shrink: 0;
  z-index: 4;
}
.chat-thread__context {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 10px 23px;
  font-size: 11px;
  color: #677760;
  background: #f5f8f1;
  border-bottom: 1px solid #e9eee3;
}
.chat-thread__context .chat-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.chat-thread__context-car {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-thread__context-divider {
  color: #c0cbb7;
  padding: 0 3px;
  flex-shrink: 0;
}
.chat-thread__context-detail {
  color: #7e8b73;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-thread__scroll {
  display: flex;
  flex-direction: column;
  overflow-anchor: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 26px 20px;
  scrollbar-width: thin;
}
.chat-thread__history {
  flex-shrink: 0;
  margin-top: auto;
}
.chat-system {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 260px;
  margin: 0 auto 22px;
  color: #8d9882;
  font-size: 10px;
}
.chat-system__line {
  flex: 1;
  height: 1px;
  background: #e5ebde;
}
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 19px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.chat-messages__day {
  align-self: center;
  border-radius: 20px;
  padding: 3px 12px;
  background: #edf1e8;
  color: #839075;
  font-size: 10px;
}
.chat-message {
  display: flex;
}
.chat-message--out {
  justify-content: flex-end;
}
.chat-message__content {
  max-width: 86%;
  min-width: 0;
}
.chat-message__bubble {
  width: fit-content;
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 13px 16px;
  border: 1px solid #e5eadd;
  border-radius: 2px 12px 12px;
  background: #fff;
  font-size: 14px;
  line-height: 1.95;
  color: #42513c;
}
.chat-message--out .chat-message__bubble {
  margin-left: auto;
  background: #e7efdf;
  border-color: #dfe8d7;
  border-radius: 12px 2px 12px 12px;
}
.chat-message--error .chat-message__bubble {
  border-color: #dccbb3;
  background: #faf2e8;
}
.chat-message__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #7c8874;
  font-size: 11px;
  margin-top: 5px;
  padding-inline: 2px;
  font-variant-numeric: tabular-nums;
}
.chat-message--out .chat-message__meta {
  justify-content: flex-end;
}
.chat-delivery {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #5e7c54;
  padding: 3px 2px;
}
.chat-delivery .chat-icon {
  width: 12px;
  height: 12px;
}
.chat-delivery--sending .chat-icon {
  animation: chat-delivery-spin 0.8s linear infinite;
}
@keyframes chat-delivery-spin {
  to {
    transform: rotate(360deg);
  }
}
.chat-delivery--scheduled {
  color: #2c5b3c;
}
.chat-delivery--error {
  color: #946a31;
}
.chat-message--pending .chat-message__bubble {
  opacity: 0.82;
}
.chat-undo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #6e845f;
}
.chat-undo__cancel {
  color: #4f6f45;
  cursor: pointer;
  padding: 3px 2px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.chat-undo__cancel:disabled {
  cursor: wait;
  opacity: 0.65;
  text-decoration: none;
}
.chat-photo {
  display: block;
  max-width: 260px;
  padding: 0;
  border: 1px solid #e3e9dc;
  border-radius: 10px;
  background: white;
  overflow: hidden;
  cursor: pointer;
}
.chat-photo:hover {
  border-color: #a0b68e;
}
.chat-photo__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 320px;
}
.chat-video {
  position: relative;
  display: block;
  max-width: 260px;
  padding: 0;
  border: 1px solid #e3e9dc;
  border-radius: 10px;
  background: #1a1f18;
  overflow: hidden;
  cursor: pointer;
}
.chat-video:hover {
  border-color: #a0b68e;
}
.chat-video__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 320px;
}
.chat-video__placeholder {
  display: grid;
  place-items: center;
  width: 260px;
  max-width: 100%;
  height: 146px;
  color: #c5d0b8;
  font-size: 12px;
}
.chat-video__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: #10181033;
  pointer-events: none;
}
.chat-video__play-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #101810cc;
  color: #fff;
}
.chat-video__play-mark .chat-icon {
  width: 22px;
  height: 22px;
}
.chat-photos {
  display: block;
  width: 260px;
  max-width: 100%;
  border: 1px solid #e3e9dc;
  border-radius: 10px;
  padding: 6px;
  background: white;
  cursor: pointer;
  text-align: left;
}
.chat-photos:hover {
  border-color: #a0b68e;
}
.chat-photos__tile {
  position: relative;
  display: grid;
  place-items: center;
  height: 86px;
  background: #e9eee3;
  color: #a2b094;
  border-radius: 5px;
}
.chat-photos__tile .chat-icon {
  width: 39px;
  height: 39px;
  stroke-width: 1;
}
.chat-photos__label {
  position: absolute;
  right: 7px;
  bottom: 4px;
  font-size: 9px;
  color: #77876b;
}
.chat-file {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px;
  background: white;
  border: 1px solid #e1e7dc;
  border-radius: 8px;
  min-width: 230px;
  margin-bottom: 8px;
  cursor: pointer;
  text-align: left;
}
.chat-file__icon {
  background: #f6e9e4;
  color: #ad8572;
  padding: 10px;
  border-radius: 6px;
}
.chat-file__name {
  display: block;
  font-size: 12px;
}
.chat-file__size {
  display: block;
  color: #7a8770;
  font-size: 10px;
  margin-top: 4px;
}
.chat-latest {
  position: absolute;
  bottom: 205px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: white;
  border: 1px solid #d5e0cc;
  box-shadow: 0 3px 10px #3246290d;
  border-radius: 20px;
  font-size: 11px;
  color: #56734a;
  cursor: pointer;
  white-space: nowrap;
}
.chat-latest .chat-icon {
  width: 14px;
  height: 14px;
}
.chat-composer {
  position: relative;
  background: white;
  border-top: 1px solid #e2e8dc;
  padding: 14px 22px 15px;
  flex-shrink: 0;
}
.chat-composer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.chat-composer__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #55734a;
  font-weight: 550;
}
.chat-composer__label .chat-icon {
  width: 14px;
  height: 14px;
}
.chat-composer__recipient {
  margin-left: 5px;
  font-size: 10px;
  color: #89917f;
  font-weight: 400;
}
.chat-composer__input {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 10px 12px;
  min-height: 82px;
  max-height: 180px;
  resize: vertical;
  border: 1px solid #e1e7db;
  border-radius: 7px;
  color: #384e30;
  background: #fdfefa;
  font-size: 14px;
  line-height: 1.8;
}
.chat-composer__input::placeholder {
  color: #919c85;
}
.chat-composer__input:focus {
  border-color: #8ba778;
}
.chat-recovered-draft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid #dfe8d7;
  border-radius: 6px;
  background: #f5f8f0;
  color: #63715b;
  font-size: 12px;
}
.chat-recovered-draft__open {
  flex-shrink: 0;
  color: #4f6f45;
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.chat-composer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.chat-composer__hint {
  font-size: 10px;
  color: #87937c;
}
.chat-composer__length {
  color: #839077;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.chat-composer__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.chat-composer__length.is-near-limit {
  color: #aa632f;
}
.chat-send {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 35px;
  padding: 7px 14px;
  border-radius: 6px;
  background: #376e4a;
  color: white;
  cursor: pointer;
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
}
.chat-send:hover {
  background: #2c5b3c;
}
.chat-send:disabled {
  background: #e8ede2;
  color: #899b7c;
  cursor: default;
}
.chat-send .chat-icon {
  width: 14px;
  height: 14px;
}
.chat-schedule-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 35px;
  padding: 6px 10px;
  border: 1px solid #d5decc;
  border-radius: 6px;
  background: #f7f9f4;
  color: #4f6a45;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
}
.chat-schedule-toggle:hover {
  background: #eef3e8;
  color: #315526;
}
.chat-schedule-toggle.is-open {
  border-color: #8ba778;
  background: #e7f1ea;
  color: #2c5b3c;
}
.chat-schedule-toggle .chat-icon {
  width: 14px;
  height: 14px;
}
.chat-schedule {
  margin: 0 0 10px;
  padding: 12px 12px 11px;
  border: 1px solid #d7e3cf;
  border-radius: 8px;
  background: #f5f8f1;
}
.chat-schedule__heading {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #376e4a;
  font-size: 12px;
}
.chat-schedule__heading .chat-icon {
  width: 15px;
  height: 15px;
}
.chat-schedule__lead {
  margin: 6px 0 10px;
  color: #6b7d5d;
  font-size: 11px;
  line-height: 1.6;
}
.chat-schedule__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.chat-schedule__label {
  color: #55734a;
  font-size: 10px;
  font-weight: 550;
}
.chat-schedule__input {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #d5decc;
  border-radius: 6px;
  background: #fff;
  color: #384e30;
  font-size: 14px;
}
.chat-schedule__input:focus {
  border-color: #8ba778;
}
.chat-schedule__preview {
  margin: 8px 0 0;
  color: #2c5b3c;
  font-size: 12px;
  font-weight: 550;
}
.chat-schedule__preview.is-error {
  color: #a45a3a;
  font-weight: 500;
}
.chat-schedule__warning {
  margin: 6px 0 0;
  color: #aa632f;
  font-size: 11px;
  line-height: 1.55;
}
.chat-schedule-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid #c5d6c0;
  border-radius: 999px;
  background: #fff;
  color: #2c5b3c;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 550;
  white-space: nowrap;
  flex-shrink: 0;
}
.chat-schedule-chip:hover,
.chat-schedule-chip.is-open {
  border-color: #8ba778;
  background: #e7f1ea;
}
.chat-schedule-chip .chat-icon {
  width: 13px;
  height: 13px;
}
.chat-schedule-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 16px;
  width: min(380px, calc(100% - 32px));
  max-height: min(52vh, 360px);
  overflow: auto;
  padding: 12px;
  border: 1px solid #d7e3cf;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 32px #2f48201f;
  z-index: 8;
}
.chat-schedule-popover__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.chat-schedule-popover__title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #376e4a;
  font-size: 12px;
  font-weight: 550;
}
.chat-schedule-popover__title .chat-icon {
  width: 14px;
  height: 14px;
}
.chat-schedule-popover__lead {
  margin: 6px 0 10px;
  color: #7a8a70;
  font-size: 10px;
  line-height: 1.5;
}
.chat-schedule-popover__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chat-schedule-card {
  padding: 10px 12px;
  border: 1px solid #d7e3cf;
  border-radius: 8px;
  background: #fff;
}
.chat-schedule-card.is-confirming {
  border-color: #e0c99a;
  background: #fffdf7;
}
.chat-schedule-card__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-schedule-card__time {
  color: #2c5b3c;
  font-size: 13px;
}
.chat-schedule-card__sender {
  color: #7a8a70;
  font-size: 10px;
}
.chat-schedule-card__text {
  margin: 8px 0;
  color: #384e30;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.chat-schedule-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.chat-schedule-card__confirm {
  color: #8f713d;
  font-size: 11px;
}
.chat-schedule-card__pending {
  color: #6d7c64;
  font-size: 11px;
}
.chat-schedule-card__cancel {
  padding: 0;
  border: 0;
  background: transparent;
  color: #a45a3a;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.chat-schedule-card__cancel:hover {
  color: #7d3d28;
}
.chat-text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #697e5c;
  font-size: 11px;
  cursor: pointer;
  padding: 5px 0;
}
.chat-text-button:hover {
  color: #315526;
}
.chat-text-button .chat-icon {
  width: 13px;
  height: 13px;
}
.chat-templates {
  position: relative;
}
.chat-templates__menu {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  width: 290px;
  max-width: calc(100vw - 48px);
  padding: 6px;
  border: 1px solid #dce5d3;
  border-radius: 9px;
  background: white;
  box-shadow: 0 8px 30px #2f48201a;
  z-index: 5;
}
.chat-templates__heading {
  color: #7e8c71;
  font-size: 10px;
  padding: 7px 9px;
}
.chat-templates__option {
  display: block;
  width: 100%;
  border-radius: 5px;
  padding: 9px;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
}
.chat-templates__option:hover {
  background: #eff5e9;
}
.chat-templates__preview {
  display: block;
  color: #78896a;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 3px;
}
.chat-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: #fbf3e5;
  border-top: 1px solid #ede0c6;
  color: #8f713d;
  font-size: 11px;
}
.chat-closed {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 25px;
  background: white;
  border-top: 1px solid var(--admin-line);
  color: #607b52;
  font-size: 12px;
}
.chat-blocked {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 14px 22px;
  background: #fbf3e5;
  border-top: 1px solid #ede0c6;
  color: #8f713d;
  font-size: 12px;
}
.chat-blocked__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.chat-blocked__refresh {
  flex-shrink: 0;
  padding: 7px 10px;
  border: 1px solid #e0c99a;
  border-radius: 6px;
  background: #fff;
  color: #8f713d;
  font-size: 11px;
  cursor: pointer;
}
.chat-blocked__refresh:hover {
  background: #fff8ec;
}
.chat-blocked__refresh:disabled {
  opacity: 0.65;
  cursor: wait;
}
.chat-details {
  width: 246px;
  flex-shrink: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  border-left: 1px solid var(--admin-line);
  background: #fff;
}
.chat-details__heading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7d5d;
  border-bottom: 1px solid var(--admin-line);
  padding: 20px;
  font-size: 12px;
}
.chat-details__heading .chat-icon {
  width: 15px;
  height: 15px;
}
.chat-customer__profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 25px 18px 22px;
}
.chat-customer__profile .chat-avatar {
  width: 55px;
  height: 55px;
  font-size: 15px;
}
.chat-customer__name {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.4px;
}
.chat-customer__line-name {
  margin-top: 4px;
  font-size: 11px;
  color: #7d8973;
}
.chat-customer__suffix {
  margin-left: 5px;
  font-size: 11px;
  font-weight: 400;
  color: #7d8973;
}
.chat-customer__friend {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 10px;
  color: #6c855b;
}
.chat-customer__friend.is-blocked {
  color: #a45a3a;
}
.chat-customer__friend.is-blocked .chat-dot {
  background: #c46a4a;
}
.chat-customer__friend.is-unknown {
  color: #8a8068;
}
.chat-customer__friend.is-unknown .chat-dot {
  background: #b7ae96;
}
.chat-customer__section {
  padding: 17px 19px;
  border-top: 1px solid #edf0e8;
}
.chat-field-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 550;
  color: #5e7152;
  margin-bottom: 11px;
}
.chat-field-label .chat-icon {
  width: 13px;
  height: 13px;
}
.chat-assignee {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid #e2e8db;
  border-radius: 6px;
  color: #849576;
}
.chat-assignee .chat-icon {
  width: 14px;
  height: 14px;
}
.chat-assignee__select {
  flex: 1;
  min-width: 0;
  height: 34px;
  font-size: 11px;
  color: #657c55;
  background: white;
}
.chat-vehicle {
  border: 1px solid #e5eadf;
  border-radius: 7px;
  overflow: hidden;
}
.chat-vehicle__art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 87px;
  background: #edf0e7;
  color: #a6b396;
}
.chat-vehicle__art .chat-icon {
  width: 54px;
  height: 54px;
  stroke-width: 0.8;
}
.chat-vehicle__art-label {
  position: absolute;
  right: 8px;
  bottom: 6px;
  font-size: 7px;
  letter-spacing: 1px;
  color: #8a9979;
}
.chat-vehicle__copy {
  padding: 11px;
}
.chat-vehicle__name {
  font-size: 12px;
  font-weight: 550;
}
.chat-vehicle__detail {
  color: #7d8d6e;
  font-size: 10px;
  line-height: 1.8;
  margin-top: 3px;
}
.chat-vehicle__purpose {
  display: inline-block;
  margin-top: 8px;
  font-size: 9px;
  color: #738664;
  background: #f0f4e9;
  padding: 2px 5px;
  border-radius: 3px;
}
.chat-customer__facts {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px 8px;
  font-size: 11px;
}
.chat-customer__label {
  color: #89947d;
}
.chat-customer__value {
  color: #647456;
  overflow-wrap: anywhere;
}
.chat-customer__private {
  margin-left: auto;
  font-weight: 400;
  font-size: 8px;
  color: #87947a;
}
.chat-memo {
  display: block;
  width: 100%;
  resize: vertical;
  min-height: 95px;
  border: 1px solid #eee7d6;
  background: #faf7ef;
  border-radius: 6px;
  padding: 10px;
  font-size: 12px;
  color: #807250;
  line-height: 1.9;
}
.chat-customer__hint {
  color: #8c9781;
  font-size: 9px;
  margin-top: 7px;
}
.chat-welcome {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fafcf7;
  color: #637853;
  text-align: center;
}
.chat-welcome__icon {
  display: grid;
  place-items: center;
  width: 65px;
  height: 65px;
  margin-bottom: 6px;
  background: #ecf2e6;
  border-radius: 20px;
  color: #8da779;
}
.chat-welcome__icon .chat-icon {
  width: 30px;
  height: 30px;
}
.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 50px 18px;
  text-align: center;
  color: #7c8c6b;
  font-size: 11px;
}
.chat-dialog {
  margin: auto;
  width: min(440px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 25px;
  border: 1px solid #dce5d2;
  border-radius: 13px;
  box-shadow: 0 20px 80px #1a351d33;
  background: white;
  color: var(--admin-ink);
}
.chat-dialog::backdrop {
  background: #20312166;
}
.chat-dialog__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.chat-dialog__title {
  font-size: 15px;
  font-weight: 600;
}
.chat-dialog__text {
  font-size: 13px;
  line-height: 2;
  color: #667858;
  margin: 20px 0;
}
.chat-dialog__confirm {
  display: block;
  margin-left: auto;
  background: #3e6f4a;
  color: white;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.chat-dialog--customer {
  padding: 18px 0 0;
}
.chat-lightbox {
  margin: auto;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #1f2a1f;
  box-shadow: 0 20px 80px #1a351d66;
  overflow: hidden;
}
.chat-lightbox::backdrop {
  background: #101810cc;
}
.chat-lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 14px;
  color: #dfe8d7;
}
.chat-lightbox__open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: inherit;
  text-decoration: none;
}
.chat-lightbox__open:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.chat-lightbox__open .chat-icon {
  width: 14px;
  height: 14px;
}
.chat-lightbox__close {
  color: #dfe8d7;
}
.chat-lightbox__image {
  display: block;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px - 44px);
  width: auto;
  height: auto;
}
.chat-lightbox__video {
  display: block;
  width: min(calc(100vw - 32px), 390px);
  max-height: calc(100dvh - 32px - 44px);
  min-height: 180px;
  background: #000;
  object-fit: contain;
}
@media (min-width: 851px) {
  .chat-lightbox__video {
    width: min(calc(100vw - 64px), 1200px);
    height: min(calc(100dvh - 64px - 44px), 780px);
    min-height: 400px;
  }
}
.chat-dialog--customer .chat-dialog__heading {
  padding: 0 18px;
}
@media (min-width: 1400px) {
  .chat-thread__info {
    display: none;
  }
}
@media (max-width: 1399px) {
  .chat-details {
    display: none;
  }
  .chat-list {
    width: 275px;
  }
}
@media (max-width: 1100px) {
  .chat-list {
    width: 255px;
  }
  .chat-composer__shortcut {
    display: none;
  }
  .chat-thread__header {
    padding-inline: 16px;
  }
  .chat-thread__scroll {
    padding-inline: 18px;
  }
}
@media (max-width: 850px) {
  .admin-content--chat {
    padding: 0 16px 16px;
  }
  .chat-page__heading {
    min-height: 60px;
  }
}
@media (max-width: 700px) {
  .admin-content--chat {
    padding: 0;
  }
  .chat-page__heading {
    min-height: 60px;
    padding: 8px 17px;
  }
  .chat-page__title {
    font-size: 17px;
  }
  .chat-page__mark {
    width: 25px;
    height: 25px;
    font-size: 7px;
    border-radius: 7px;
  }
  .chat-page__title-group {
    gap: 8px;
  }
  .chat-workspace {
    border-inline: 0;
    border-bottom: 0;
    border-radius: 0;
  }
  .chat-list {
    width: 100%;
    border-right: 0;
  }
  .has-conversation .chat-list {
    display: none;
  }
  .chat-welcome {
    display: none;
  }
  .chat-list__heading {
    padding: 18px 20px;
  }
  .chat-list__title {
    font-size: 16px;
  }
  .chat-search {
    margin-inline: 20px;
  }
  .chat-search__input {
    font-size: 16px;
    height: 42px;
  }
  .chat-filters {
    padding-inline: 20px;
  }
  .chat-filter {
    font-size: 12px;
    min-height: 40px;
  }
  .chat-contact {
    padding: 19px 20px;
    gap: 13px;
  }
  .chat-contact__name {
    font-size: 14px;
  }
  .chat-contact__car,
  .chat-contact__time {
    font-size: 11px;
  }
  .chat-contact__preview {
    font-size: 12px;
  }
  .chat-contact__tag {
    font-size: 10px;
  }
  .chat-thread__back {
    display: inline-grid;
    margin-left: -7px;
  }
  .chat-thread__header {
    padding: 11px 13px;
    min-height: 69px;
    gap: 8px;
  }
  .chat-thread__header .chat-avatar {
    display: none;
  }
  .chat-thread__name {
    font-size: 14px;
  }
  .chat-thread__subject {
    font-size: 9px;
  }
  .chat-thread__line-name {
    font-size: 9px;
  }
  .chat-icon-button {
    width: 40px;
    height: 40px;
  }
  .chat-resolve {
    font-size: 10px;
    padding: 9px 8px;
    min-height: 38px;
  }
  .chat-thread__context {
    padding: 9px 16px;
    font-size: 10px;
  }
  .chat-thread__context-detail {
    display: none;
  }
  .chat-thread__context-divider {
    display: none;
  }
  .chat-thread__scroll {
    padding: 17px 16px;
  }
  .chat-message__content {
    max-width: 90%;
  }
  .chat-message__bubble {
    padding: 11px 13px;
    font-size: 13px;
    line-height: 1.85;
  }
  .chat-message__meta {
    font-size: 10px;
  }
  .chat-delivery {
    padding-block: 6px;
  }
  .chat-composer {
    padding: 11px 14px max(12px, env(safe-area-inset-bottom));
  }
  .chat-thread__context {
    padding-inline: 13px;
  }
  .chat-schedule-popover {
    right: 8px;
    width: calc(100% - 16px);
  }
  .chat-schedule-toggle__label {
    display: none;
  }
  .chat-schedule__input {
    font-size: 16px;
  }
  .chat-composer__input {
    font-size: 16px;
    min-height: 76px;
    max-height: 140px;
    margin-block: 8px;
  }
  .chat-composer__recipient {
    display: none;
  }
  .chat-send {
    min-height: 40px;
    font-size: 12px;
  }
  .chat-composer__hint {
    font-size: 10px;
  }
  .chat-composer__shortcut {
    display: none;
  }
  .chat-latest {
    bottom: 194px;
  }
  .chat-warning {
    font-size: 10px;
    padding: 9px 14px;
  }
  .chat-assignee__select,
  .chat-memo {
    font-size: 16px;
  }
}

/* Focused thread inside inquiry drawer */
.chat-workspace--focused {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}
.chat-workspace--focused .chat-thread {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.chat-workspace--focused .chat-thread__back {
  display: none;
}
.chat-root--drawer .chat-workspace--focused,
.chat-root--drawer .chat-loading,
.chat-root--drawer .chat-empty {
  flex: 1;
  min-height: 0;
}
