.shell {
  display: grid;
  grid-template-columns: 218px 1fr;
  min-height: 100dvh;
}
.sidebar {
  background: #123d38;
  color: #d4e1dc;
  display: flex;
  flex-direction: column;
  padding: 29px 17px 20px;
  position: fixed;
  inset: 0 auto 0 0;
  width: 218px;
  z-index: 20;
}
.sidebar .brand {
  margin: 0 11px 42px;
  font-size: 19px;
  color: white;
}
.nav-label {
  font-size: 9px;
  letter-spacing: 1.7px;
  color: #79a097;
  margin: 0 15px 13px;
}
.nav {
  display: grid;
  gap: 5px;
}
.nav button {
  background: transparent;
  border: 0;
  color: #a3bfb7;
  justify-content: flex-start;
  padding: 12px 14px;
  gap: 12px;
  font-size: 12px;
  border-radius: 8px;
}
.nav button:hover {
  background: #ffffff09;
  color: white;
}
.nav button.active {
  background: #ffffff11;
  color: white;
  box-shadow: inset 3px 0 0 #80c9ab;
}
.nav button .count {
  margin-left: auto;
  background: #80c9ab;
  color: #153f33;
  border-radius: 5px;
  padding: 2px 5px;
  font-size: 10px;
}
.sidebar-divider {
  border-top: 1px solid #ffffff0c;
  margin: 26px 12px;
}
.workspace-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #ffffff12;
  padding: 12px 11px;
  border-radius: 9px;
  font-size: 10px;
  color: #8cb0a5;
  margin-top: auto;
  line-height: 1.6;
}
.workspace-chip .icon {
  color: #82c9aa;
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 13px 9px 0;
}
.profile .avatar {
  background: #356057;
  color: #c9dfd4;
}
.profile strong {
  font-size: 11px;
  display: block;
  color: #dcece4;
}
.profile small {
  font-size: 10px;
  color: #84a99a;
}
.profile .ghost {
  color: #a5c4b6;
  margin-left: auto;
}
.main {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 74px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  background: #fff;
}
.breadcrumb {
  font-size: 11px;
  color: #90a29b;
  display: flex;
  align-items: center;
  gap: 12px;
}
.breadcrumb b {
  color: #536e62;
  font-weight: 500;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 13px;
}
.online-toggle {
  font-size: 11px;
  padding: 7px 11px;
  border: 1px solid #e0ebe4;
  border-radius: 20px;
}
.online-toggle .dot {
  background: #65ab87;
}
.page {
  padding: 28px 30px;
}
.page.inbox-page {
  padding-bottom: 18px;
}
.page-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  gap: 20px;
}
.page-intro p {
  color: #91a096;
  margin-top: 8px;
  font-size: 12px;
}
.page-intro .actions {
  display: flex;
  gap: 10px;
}
.site-filter {
  min-width: 180px;
  max-width: 240px;
  font-size: 12px;
  padding: 9px 13px;
  background: white;
}
.inbox-grid {
  display: grid;
  grid-template-columns: 286px minmax(300px, 1fr) 235px;
  height: calc(100dvh - 211px);
  min-height: 500px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  box-shadow: 0 5px 20px #183b3205;
}
.inbox-list {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.list-heading {
  padding: 20px 18px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.list-heading .number {
  color: #668279;
  font-size: 10px;
  background: #eef4f0;
  padding: 3px 7px;
  border-radius: 5px;
  margin-left: 6px;
}
.search {
  margin: 0 15px 13px;
  position: relative;
}
.search input {
  background: #f7f9f8;
  border: 1px solid #edf1ee;
  border-radius: 7px;
  padding: 10px 12px 10px 33px;
  font-size: 11px;
}
.search .icon {
  position: absolute;
  left: 11px;
  top: 11px;
  width: 13px;
  height: 13px;
  color: #a1aea6;
}
.filter-tabs {
  display: flex;
  gap: 5px;
  padding: 0 15px 14px;
  border-bottom: 1px solid var(--line);
}
.filter-tabs button {
  font-size: 10px;
  padding: 6px 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #8b9b94;
}
.filter-tabs button.active {
  background: #e9f3ed;
  color: #3c8064;
}
.conversation-list {
  overflow: auto;
  flex: 1;
}
.conversation-item {
  display: flex;
  width: 100%;
  align-items: flex-start;
  text-align: left;
  gap: 11px;
  padding: 18px 15px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #f1f4f2;
  background: white;
}
.conversation-item.active {
  background: #f0f7f3;
  box-shadow: inset 3px 0 0 #73b693;
}
.conversation-item .avatar {
  width: 33px;
  height: 33px;
  font-size: 10px;
  border-radius: 11px;
}
.conversation-summary {
  min-width: 0;
  flex: 1;
}
.conversation-summary .row {
  gap: 4px;
  justify-content: space-between;
  align-items: center;
}
.conversation-summary strong {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
.conversation-summary time {
  font-size: 9px;
  color: #a6b3ac;
}
.conversation-summary p {
  font-size: 11px;
  color: #95a39b;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  margin-top: 6px;
  line-height: 1.5;
}
.conversation-summary footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
}
.site-dot {
  font-size: 9px;
  color: #7b9b8b;
  display: flex;
  align-items: center;
  gap: 5px;
}
.site-dot i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--site-color, #76a987);
}
.unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5c9c76;
}
.conversation-summary .pill {
  font-size: 8px;
  padding: 3px 6px;
}
.thread {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #fff;
}
.thread-header {
  min-height: 75px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.thread-header h3 {
  font-size: 13px;
}
.thread-header .sub {
  margin-top: 5px;
  font-size: 10px;
  color: #9aaca2;
}
.thread-header .sub i {
  color: #76a989;
}
.thread-actions {
  display: flex;
  gap: 5px;
}
.thread-actions button {
  padding: 7px;
}
.thread-actions .icon {
  width: 15px;
  height: 15px;
}
.ai-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #f5f4fb;
  padding: 10px 20px;
  border-bottom: 1px solid #efedf5;
  color: #9482aa;
  font-size: 10px;
}
.ai-banner .icon {
  width: 14px;
  height: 14px;
}
.ai-banner button {
  margin-left: auto;
  font-size: 9px;
  padding: 5px 8px;
  background: #fff;
  border: 1px solid #e3dfee;
  color: #8e78a4;
}
.messages {
  flex: 1;
  overflow: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 19px;
  scroll-behavior: smooth;
}
.date-divider {
  text-align: center;
  font-size: 9px;
  color: #a5b2a8;
  margin: 1px 0 12px;
  position: relative;
}
.bubble-wrap {
  max-width: 85%;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bubble-wrap.outgoing {
  align-self: flex-end;
  align-items: flex-end;
}
.bubble-meta {
  font-size: 9px;
  color: #94a59a;
  display: flex;
  gap: 7px;
  align-items: center;
}
.bubble {
  padding: 12px 15px;
  font-size: 12px;
  line-height: 1.8;
  background: #f4f6f5;
  border: 1px solid #eaf0ec;
  border-radius: 0 11px 11px 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #647c6d;
}
.outgoing .bubble {
  background: #eef5f0;
  border-color: #e0ede4;
  border-radius: 11px 0 11px 11px;
  color: #3e6b53;
}
.private-note .bubble {
  background: #fff6df;
  border-color: #f5e7c3;
  color: #90723c;
}
.system-message {
  text-align: center;
  color: #9aaa9f;
  font-size: 10px;
  line-height: 1.6;
  margin: 2px 0;
}
.product-card {
  background: white;
  border: 1px solid #dde9e0;
  border-radius: 9px;
  padding: 14px;
  margin-top: 8px;
  white-space: normal;
  font-size: 12px;
  max-width: 350px;
}
.product-card p {
  font-size: 11px;
  line-height: 1.7;
  margin: 8px 0;
  white-space: pre-wrap;
}
.product-card .price {
  color: #358561;
  font-weight: 600;
  display: block;
  margin-top: 8px;
}
.product-card a {
  display: inline-block;
  margin-top: 7px;
  font-size: 11px;
}
.attachment-button {
  font-size: 11px;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}
.composer {
  margin: 0 20px 16px;
  border: 1px solid #dfe9e2;
  border-radius: 10px;
  overflow: hidden;
}
.composer-top {
  display: flex;
  gap: 15px;
  padding: 11px 13px 0;
}
.composer-top button {
  border: 0;
  background: none;
  padding: 0 0 8px;
  font-size: 10px;
  color: #9aa99f;
  border-radius: 0;
}
.composer-top button.active {
  color: #537e61;
  border-bottom: 2px solid #76a985;
}
.composer textarea {
  border: 0;
  border-radius: 0;
  padding: 12px 14px;
  min-height: 70px;
  max-height: 160px;
  box-shadow: none;
  font-size: 12px;
  resize: none;
}
.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px 10px;
}
.composer-tools {
  display: flex;
  gap: 2px;
}
.composer-tools button {
  color: #92a89a;
}
.composer-tools .icon {
  width: 16px;
  height: 16px;
}
.composer .send {
  font-size: 10px;
  padding: 8px 12px;
  border-radius: 7px;
}
.composer-note {
  font-size: 9px;
  color: #adbab0;
  padding: 0 22px 13px;
  display: flex;
  justify-content: space-between;
}
.visitor-panel {
  border-left: 1px solid var(--line);
  overflow: auto;
}
.visitor-profile {
  padding: 24px 20px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.visitor-profile .avatar {
  margin: 0 auto 12px;
}
.visitor-profile h3 {
  font-size: 13px;
}
.visitor-profile p {
  font-size: 10px;
  color: #91a698;
  margin: 7px 0 13px;
  overflow-wrap: anywhere;
}
.visitor-profile button {
  font-size: 9px;
  padding: 6px 12px;
}
.visitor-section {
  padding: 19px 18px;
  border-bottom: 1px solid var(--line);
}
.visitor-section h4 {
  margin: 0 0 17px;
  font-size: 10px;
  color: #607e6a;
  font-weight: 650;
  display: flex;
  justify-content: space-between;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 7px;
  font-size: 10px;
  margin: 13px 0;
  color: #82998a;
}
.detail-row span:first-child {
  color: #a2b1a7;
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-row .icon {
  width: 12px;
  height: 12px;
}
.detail-row span:last-child {
  text-align: right;
  max-width: 135px;
  overflow-wrap: anywhere;
}
.visitor-section .page-link {
  font-size: 10px;
  display: flex;
  gap: 7px;
  color: #789c85;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.tag-chip {
  font-size: 9px;
  background: #eff5f0;
  color: #83a08c;
  padding: 5px 7px;
  border-radius: 4px;
}
.visitor-section select {
  font-size: 10px;
  padding: 8px;
}
.conversation-list::-webkit-scrollbar,
.messages::-webkit-scrollbar,
.visitor-panel::-webkit-scrollbar {
  width: 4px;
}
.conversation-list::-webkit-scrollbar-thumb,
.messages::-webkit-scrollbar-thumb,
.visitor-panel::-webkit-scrollbar-thumb {
  background: #dce7df;
  border-radius: 5px;
}
.mobile-back {
  display: none;
}
.call-banner {
  background: #e7f4ed;
  border-bottom: 1px solid #d8eadd;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 11px;
}
.call-banner button {
  padding: 6px 10px;
  font-size: 10px;
}
.mobile-menu {
  display: none;
}
.connection {
  font-size: 10px;
  color: #9ab1a3;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
}
@media (min-width: 1600px) {
  .inbox-grid {
    grid-template-columns: 320px minmax(400px, 1fr) 270px;
  }
  .page {
    padding: 32px 42px;
  }
  .inbox-grid {
    height: calc(100dvh - 225px);
  }
}
@media (max-width: 1250px) {
  .inbox-grid {
    grid-template-columns: 265px minmax(300px, 1fr);
  }
  .visitor-panel {
    display: none;
  }
  .sidebar {
    width: 190px;
  }
  .shell {
    grid-template-columns: 190px 1fr;
  }
  .sidebar .brand {
    font-size: 16px;
    margin-left: 3px;
  }
  .page {
    padding: 24px;
  }
  .topbar {
    padding: 0 24px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    width: 74px;
    padding: 27px 9px 15px;
  }
  .shell {
    grid-template-columns: 74px 1fr;
  }
  .sidebar .brand {
    margin: 0 10px 35px;
  }
  .sidebar .brand span,
  .sidebar .brand em,
  .nav-label,
  .nav button span,
  .workspace-chip,
  .sidebar-divider,
  .profile strong,
  .profile small,
  .profile > .ghost {
    display: none;
  }
  .nav button {
    justify-content: center;
    padding: 14px;
  }
  .nav button .count {
    display: none;
  }
  .profile {
    padding: 10px;
    margin-top: auto;
  }
  .profile .avatar {
    width: 30px;
    height: 30px;
  }
  .page {
    padding: 21px 18px;
  }
  .inbox-grid {
    grid-template-columns: 235px minmax(240px, 1fr);
  }
  .bubble-wrap {
    max-width: 94%;
  }
  .thread-header {
    padding: 15px;
  }
  .page-intro h1 {
    font-size: 24px;
  }
  .page-intro .hint {
    display: none;
  }
  .messages {
    padding: 18px;
  }
  .topbar {
    height: 62px;
    padding: 0 20px;
  }
  .inbox-grid {
    height: calc(100dvh - 184px);
  }
  .composer {
    margin: 0 12px 12px;
  }
  .login-story {
    padding: 40px;
  }
  .login-story h1 {
    font-size: 36px;
  }
  .login {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 660px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    width: 100%;
    height: 58px;
    top: auto;
    bottom: 0;
    right: 0;
    flex-direction: row;
    padding: 4px 5px;
    justify-content: space-around;
  }
  .sidebar .brand,
  .sidebar .profile {
    display: none;
  }
  .nav {
    display: flex;
    justify-content: space-around;
    width: 100%;
    gap: 0;
  }
  .nav button {
    padding: 12px;
    flex: 1;
    border-radius: 8px;
  }
  .nav.secondary {
    display: none;
  }
  .nav button.active {
    box-shadow: none;
    background: #ffffff15;
    color: #9de0bc;
  }
  .nav button .icon {
    width: 20px;
    height: 20px;
  }
  .main {
    grid-column: 1;
    padding-bottom: 58px;
  }
  .topbar {
    height: 53px;
    padding: 0 17px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .breadcrumb span {
    display: none;
  }
  .topbar-actions {
    gap: 5px;
  }
  .page {
    padding: 19px 12px;
  }
  .page-intro {
    margin-bottom: 17px;
    align-items: flex-start;
  }
  .page-intro h1 {
    font-size: 22px;
  }
  .page-intro p {
    font-size: 10px;
    max-width: 190px;
    line-height: 1.5;
  }
  .page-intro .actions {
    gap: 5px;
  }
  .site-filter {
    min-width: 125px;
    max-width: 145px;
    font-size: 10px;
    padding: 8px;
  }
  .inbox-grid {
    display: block;
    height: calc(100dvh - 211px);
    min-height: 300px;
    border-radius: 10px;
  }
  .inbox-list {
    height: 100%;
    border-right: 0;
  }
  .thread,
  .visitor-panel {
    display: none;
  }
  .inbox-grid.mobile-thread .inbox-list {
    display: none;
  }
  .inbox-grid.mobile-thread .thread {
    display: flex;
    height: 100%;
  }
  .mobile-back {
    display: flex !important;
  }
  .conversation-item {
    padding: 17px;
  }
  .conversation-summary strong {
    max-width: 200px;
    font-size: 12px;
  }
  .conversation-summary p {
    font-size: 12px;
  }
  .conversation-summary footer {
    margin-top: 7px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .page-intro .actions .primary {
    font-size: 10px;
    padding: 9px;
  }
  .dialog-body {
    padding: 20px;
  }
  .dialog-head {
    padding: 20px;
  }
  .dialog-footer {
    padding: 16px 20px;
  }
  .login {
    display: block;
  }
  .login-story {
    min-height: 260px;
    padding: 30px;
  }
  .login-story h1 {
    font-size: 32px;
    margin-top: 35px;
    margin-bottom: 15px;
  }
  .login-story p {
    font-size: 12px;
    line-height: 1.6;
  }
  .login-story > small {
    display: none;
  }
  .login-form {
    padding: 35px 24px;
  }
  .login-form form {
    width: 100%;
    max-width: 400px;
  }
  .topbar .desktop-only {
    display: none;
  }
  .card {
    padding: 18px;
  }
  .cards {
    gap: 12px;
  }
  .row.wrap {
    gap: 7px;
  }
  .thread-header {
    min-height: 66px;
    padding: 12px;
  }
  .thread-actions {
    gap: 2px;
  }
  .thread-header h3 {
    font-size: 12px;
  }
  .messages {
    padding: 16px;
  }
  .ai-banner {
    padding: 9px 12px;
  }
  .table-wrap {
    font-size: 11px;
  }
  td,
  th {
    padding: 14px;
  }
  .composer textarea {
    font-size: 16px;
    min-height: 64px;
  }
  .nav button {
    padding: 10px 8px;
  }
  .nav button .icon {
    width: 18px;
    height: 18px;
  }
}

/* Supporting text remains readable on a laptop and phone. */
.page-intro p,
.conversation-summary p,
.connection,
.hint,
.muted {
  color: #60766a;
}
.conversation-summary time,
.bubble-meta,
.composer-note,
.detail-row span:first-child {
  color: #697f72;
}
.conversation-summary strong,
.conversation-summary p,
.thread-header h3 {
  font-size: 13px;
}
.filter-tabs button,
.bubble-meta,
.composer-note,
.connection,
.visitor-section h4,
.detail-row,
.visitor-profile p,
.visitor-section .page-link,
.tag-chip {
  font-size: 11px;
}
.bubble {
  font-size: 13px;
}
.composer .send {
  font-size: 12px;
}
.visitor-section select {
  font-size: 12px;
}
.visitor-section h4 {
  color: #486855;
}
.detail-row {
  color: #4c6957;
}
.sidebar .profile small {
  color: #b0c8be;
}
.nav-label {
  color: #a5c5ba;
}
