body {
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 10%, rgba(179, 218, 235, 0.55), transparent 26rem),
    radial-gradient(circle at 88% 85%, rgba(231, 213, 184, 0.3), transparent 25rem),
    #eef3f3;
}

.app-header {
  width: 100%;
  height: 64px;
  padding: 0 max(24px, calc((100vw - 1120px) / 2));
  position: relative;
  z-index: 20;
  border-bottom: 1px solid #e4ebe7;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

.app-shell {
  width: min(1120px, 100%);
  height: calc(100vh - 64px);
  min-height: 0;
  margin: 0 auto;
  display: block;
  position: relative;
  overflow: hidden;
  border: 0;
  border-left: 1px solid #e3ebe7;
  border-right: 1px solid #e3ebe7;
  border-radius: 0;
  background:
    radial-gradient(circle at 82% 12%, rgba(209, 231, 241, 0.42), transparent 25rem),
    radial-gradient(circle at 14% 90%, rgba(237, 225, 200, 0.3), transparent 24rem),
    #fbfcfa;
  box-shadow: 0 12px 50px rgba(34, 61, 52, 0.09);
  backdrop-filter: none;
}

.app-shell::before,
.app-shell::after {
  content: none;
}

.chat-panel {
  width: min(900px, 100%);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  background: transparent;
}

.conversation-head {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #e4ebe7;
}

.conversation-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.conversation-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, #177760, #0b4d3e);
  box-shadow: 0 8px 20px rgba(11, 77, 62, 0.18);
  font-family: "STSong", "Songti SC", serif;
  font-size: 22px;
}

.conversation-avatar::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 10px;
  height: 10px;
  border: 3px solid #fbfcfa;
  border-radius: 50%;
  background: #45bf91;
}

.conversation-identity strong,
.conversation-identity span {
  display: block;
}

.conversation-identity strong {
  max-width: 460px;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-identity span {
  margin-top: 4px;
  color: #87928e;
  font-size: 9px;
}

.conversation-identity span i {
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 50%;
  background: #45bf91;
}

.conversation-head > p {
  max-width: 330px;
  margin: 0;
  overflow: hidden;
  color: #8a9691;
  font-size: 10px;
  line-height: 1.5;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-log {
  width: 100%;
  max-height: none;
  min-height: 0;
  flex: 1;
  margin: 0;
  padding: 24px 4px 155px;
  position: static;
  display: block;
  overflow-y: auto;
  transform: none;
}

.message {
  width: min(80%, 690px);
}

.message.is-agent .message-bubble {
  border-color: #dce6e1;
  background: #fff;
  box-shadow: 0 8px 24px rgba(32, 62, 51, 0.05);
  backdrop-filter: none;
}

.message.is-user .message-bubble {
  border-color: #0b5d49;
  background: #0b5d49;
}

.message-meta {
  color: #8d9994;
  text-shadow: none;
}

.quick-replies {
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0 4px 118px;
  position: absolute;
  left: 0;
  bottom: 0;
  transform: none;
}

.quick-reply {
  border-color: #d4e2db;
  background: #fff;
  backdrop-filter: none;
}

.composer {
  width: 100%;
  position: absolute;
  left: 0;
  bottom: 34px;
  z-index: 6;
  transform: none;
  border: 1px solid #ccdcd4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 13px 38px rgba(27, 67, 53, 0.1);
}

.composer-tool {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-self: center;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: #72827b;
  background: transparent;
}

.composer-tool:hover {
  color: var(--green);
  background: var(--green-pale);
}

.composer-tool svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.composer-note {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 5;
  color: #8b9792;
  transform: translateX(-50%);
  white-space: nowrap;
  text-shadow: none;
}

.send-button {
  background: #1679d7;
}

.profile-panel {
  top: 64px;
  height: calc(100vh - 64px);
  background: #f8fbf8;
}

.profile-panel .profile-header {
  padding-right: 42px;
}

.workspace-backdrop {
  inset: 64px 0 0;
}

body.is-admin .app-header,
body.is-admin .app-shell,
body.is-admin .workspace-backdrop {
  visibility: hidden;
}

@media (max-width: 700px) {
  .app-header {
    height: 58px;
    padding: 0 14px;
  }

  .app-shell {
    height: calc(100vh - 58px);
    border: 0;
  }

  .chat-panel {
    padding: 0 14px;
  }

  .conversation-head {
    min-height: 72px;
  }

  .conversation-avatar {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    font-size: 19px;
  }

  .conversation-identity strong {
    max-width: 190px;
    font-size: 13px;
  }

  .conversation-head > p {
    display: none;
  }

  .chat-log {
    padding: 18px 0 142px;
  }

  .message {
    width: 91%;
  }

  .composer {
    bottom: 36px;
    border-radius: 14px;
  }

  .composer-tool {
    width: 32px;
  }

  .composer-note {
    bottom: 13px;
    font-size: 8px;
  }

  .profile-panel {
    top: 58px;
    height: calc(100vh - 58px);
  }

  .workspace-backdrop {
    inset: 58px 0 0;
  }
}
