:root {
  font:
    15px/1.55 system-ui,
    -apple-system,
    sans-serif;
  color: #152e2a;
  background: #f4f7f5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  background: white;
  border: 1px solid #9fb5aa;
  border-radius: 8px;
  padding: 10px 16px;
  color: #152e2a;
  cursor: pointer;
}
button:hover {
  background: #e5f3ee;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.primary {
  background: #075e54;
  border-color: #075e54;
  color: white;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #37806d;
  outline-offset: 2px;
}
input,
select,
textarea {
  padding: 11px;
  border: 1px solid #9fb5aa;
  border-radius: 8px;
  width: 100%;
  background: white;
  color: #152e2a;
}
textarea {
  resize: vertical;
}
label {
  display: block;
  margin: 14px 0;
  font-size: 14px;
}
label input,
label select,
label textarea {
  display: block;
  margin-top: 6px;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.check input {
  width: auto;
  margin: 0;
}
.logo {
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -1px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 2px;
  color: #566c66;
  margin-top: 0;
}
h1 {
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -1.4px;
  margin: 10px 0 16px;
}
h2 {
  font-size: 20px;
  margin: 0 0 12px;
}
h3 {
  font-size: 16px;
}
.muted {
  color: #566c66;
}
.small {
  font-size: 12px;
}
.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.intro {
  background: #075e54;
  color: #f0fff8;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.intro .logo {
  margin-bottom: 70px;
}
.intro h1 {
  font-size: 54px;
  letter-spacing: -2px;
}
.intro .eyebrow {
  color: #b4e0cf;
}
.intro-note {
  margin-top: 30px;
  border: 1px solid #679b89;
  padding: 20px;
  border-radius: 12px;
  max-width: 440px;
}
.auth-panel {
  align-self: center;
  padding: 60px;
  max-width: 560px;
  width: 100%;
  margin: auto;
}
.auth-panel .primary {
  width: 100%;
  margin-top: 10px;
}
.link {
  border: 0;
  background: none;
  color: #075e54;
  padding-left: 0;
  margin-top: 16px;
}
header {
  height: 80px;
  background: white;
  border-bottom: 1px solid #c8d5cc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}
.shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: calc(100vh - 80px);
}
.shell > aside {
  background: white;
  border-right: 1px solid #c8d5cc;
  padding: 28px 20px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
nav button {
  border: 0;
  text-align: left;
}
nav button.active {
  background: #e5f3ee;
  color: #075e54;
  font-weight: 650;
}
.side-note {
  background: #f4f7f5;
  border-radius: 12px;
  padding: 18px;
  margin-top: 48px;
  font-size: 13px;
}
main {
  padding: 40px;
  max-width: 1400px;
  width: 100%;
}
.card {
  background: white;
  border: 1px solid #c0d0c5;
  padding: 24px;
  border-radius: 14px;
  margin: 20px 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.stats .card {
  margin: 10px 0;
}
.number {
  display: block;
  font:
    42px/1.4 Georgia,
    serif;
}
.banner {
  background: #e5f3ee;
  border: 1px solid #b6d5c6;
  padding: 24px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 24px 0;
}
.banner p {
  margin: 0;
}
.row {
  padding: 16px 0;
  border-bottom: 1px solid #dce5df;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.row:last-child {
  border: 0;
}
.tag {
  display: inline-block;
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 6px;
  background: #e5f3ee;
  color: #075e54;
}
.inbox {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
}
.thread {
  display: block;
  width: 100%;
  text-align: left;
  margin: 10px 0;
}
.thread.selected {
  background: #e5f3ee;
  border-color: #075e54;
}
.messages {
  height: 380px;
  overflow: auto;
  background: #f4f7f5;
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0;
}
.bubble {
  padding: 12px 16px;
  background: white;
  border: 1px solid #d1dfd5;
  border-radius: 12px;
  margin: 12px 0;
  max-width: 85%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble.out {
  margin-left: auto;
  background: #e5f3ee;
}
.bubble small {
  display: block;
  color: #566c66;
  margin-top: 8px;
  font-size: 11px;
}
.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.note {
  background: #fff4df;
  color: #75470a;
  border-radius: 8px;
  padding: 14px;
  font-size: 13px;
}
output {
  display: block;
  padding: 16px;
  background: #f4f7f5;
  white-space: pre-wrap;
  margin-top: 16px;
  border-radius: 8px;
}
output:empty {
  display: none;
}
progress {
  width: 100%;
  height: 12px;
  accent-color: #075e54;
}
hr {
  border: 0;
  border-top: 1px solid #dce5df;
  margin: 24px 0;
}
#toast {
  position: fixed;
  z-index: 10;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #152e2a;
  color: white;
  padding: 16px 24px;
  border-radius: 10px;
  max-width: 90vw;
  box-shadow: 0 4px 20px #0002;
}
#qr-image {
  max-width: 100%;
  object-fit: contain;
}
.danger {
  color: #ab3434;
}
.empty {
  padding: 20px 0;
  color: #566c66;
}
@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  main {
    padding: 24px;
  }
  .inbox {
    grid-template-columns: 1fr;
  }
  .intro {
    padding: 32px;
  }
  .intro h1 {
    font-size: 40px;
  }
  .auth-panel {
    padding: 32px;
  }
}
@media (max-width: 650px) {
  .auth,
  .columns,
  .stats,
  .shell {
    grid-template-columns: 1fr;
  }
  .intro {
    padding: 28px;
  }
  .intro .logo {
    margin-bottom: 24px;
  }
  .intro h1 {
    font-size: 34px;
  }
  .intro-note {
    display: none;
  }
  aside {
    padding: 12px;
    overflow: auto;
  }
  .side-note,
  aside > .eyebrow {
    display: none;
  }
  nav {
    flex-direction: row;
    min-width: max-content;
  }
  nav button {
    font-size: 13px;
    padding: 10px;
  }
  .banner {
    align-items: flex-start;
    flex-direction: column;
  }
  main {
    padding: 20px;
  }
  h1 {
    font-size: 30px;
  }
  header {
    padding: 16px;
    height: auto;
  }
  #user-name {
    display: none;
  }
  .card {
    padding: 18px;
  }
}

.chat-image {
  display: block;
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 8px;
  margin: 10px 0;
}
.chat-media {
  display: block;
  max-width: 100%;
  max-height: 360px;
  margin: 10px 0;
}
.media-link {
  display: block;
  margin-top: 10px;
  color: #075e54;
  overflow-wrap: anywhere;
}
.media-error {
  font-size: 12px;
  color: #85520d;
}
/* ZaloDesk desktop messenger */
:root {
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    system-ui,
    sans-serif;
  color: #182b49;
  background: #f3f5f8;
  --blue: #0068ff;
  --line: #e4e8ee;
  --muted: #758195;
}
button {
  border-color: #dce1e8;
  color: #243651;
  border-radius: 7px;
}
button:hover {
  background: #edf3ff;
}
button.primary,
.send-button {
  background: #0068ff;
  border-color: #0068ff;
  color: white;
}
input,
select,
textarea {
  border-color: #dfe4ec;
  color: #182b49;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #0068ff;
}
.muted {
  color: #758195;
}
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
header {
  height: 48px;
  padding: 0 24px 0 92px;
  border-color: var(--line);
  font-size: 12px;
}
header .logo {
  font-size: 17px;
  letter-spacing: -0.5px;
}
header .actions {
  gap: 18px;
}
header #logout {
  font-size: 12px;
  padding: 4px 10px;
}
.workspace-tag {
  color: #758195;
}
#header-quota {
  color: #0068ff;
  background: #edf4ff;
  padding: 3px 9px;
  border-radius: 5px;
}
#user-name {
  font-weight: 600;
}
.shell {
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: calc(100dvh - 48px);
}
.shell > aside {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  width: 72px;
  background: #075ce5;
  border: 0;
  padding: 18px 8px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 30px;
}
.shell > aside > .eyebrow,
.side-note {
  display: none;
}
.rail-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  color: #0068ff;
  display: grid;
  place-items: center;
  border: 2px solid #95baff;
  font-weight: 700;
}
.shell nav {
  width: 100%;
  gap: 12px;
  min-width: 0;
}
.shell nav button {
  height: 52px;
  width: 56px;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 10px;
}
.shell nav button:hover {
  background: #ffffff20;
}
.shell nav button.active {
  background: #034cbd;
  color: white;
}
.shell nav button svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.7;
}
.shell nav button span {
  display: none;
}
.shell main {
  grid-column: 2;
  max-width: none;
  padding: 32px 40px;
  min-width: 0;
}
#workspace.inbox-mode {
  height: 100dvh;
  overflow: hidden;
}
.inbox-mode .shell {
  height: calc(100dvh - 48px);
  min-height: 0;
}
.inbox-mode main {
  padding: 0;
  height: 100%;
  overflow: hidden;
}
.inbox-mode [data-page="inbox"] {
  height: 100%;
}
.inbox {
  height: 100%;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 0;
}
.thread-list {
  margin: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 0;
}
.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 14px;
}
.list-heading h1 {
  font-size: 21px;
  letter-spacing: -0.5px;
  margin: 0 0 2px;
}
.icon-button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  flex-shrink: 0;
}
.search-wrap {
  display: flex;
  align-items: center;
  background: #f0f2f5;
  margin: 0 16px 10px;
  border-radius: 7px;
  padding: 0 10px;
  color: #758195;
  gap: 7px;
}
.search-wrap svg {
  width: 18px;
}
.search-wrap input {
  background: transparent;
  border: 0;
  padding: 9px 0;
  font-size: 13px;
  min-width: 0;
}
.list-account {
  padding: 0 16px 10px;
}
.list-account select {
  font-size: 12px;
  padding: 7px 10px;
  background: #fbfcfd;
  border-color: #edf0f4;
}
.list-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  gap: 8px;
}
.filter-tabs {
  display: flex;
  gap: 14px;
}
.filter-tabs button {
  border: 0;
  border-radius: 0;
  font-size: 13px;
  padding: 10px 0;
  white-space: nowrap;
  color: #758195;
}
.filter-tabs button.active {
  color: #0068ff;
  border-bottom: 2px solid #0068ff;
  font-weight: 600;
}
.list-filters select {
  border: 0;
  width: 85px;
  padding: 5px 0;
  font-size: 12px;
  background: white;
}
#threads {
  flex: 1;
  overflow: auto;
  min-height: 0;
  padding: 6px 0;
  scrollbar-width: thin;
}
.thread {
  border: 0;
  border-radius: 0;
  display: flex;
  position: relative;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px 18px;
  margin: 0;
  text-align: left;
  background: white;
  min-height: 86px;
}
.thread:hover {
  background: #f5f7fa;
}
.thread.selected {
  background: #e5efff;
  border: 0;
}
.avatar {
  height: 46px;
  width: 46px;
  border-radius: 50%;
  background: #e1ebff;
  color: #3063bb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  flex-shrink: 0;
}
.tone-1 {
  background: #e3f1ed;
  color: #418271;
}
.tone-2 {
  background: #fceadf;
  color: #a96c42;
}
.tone-3 {
  background: #eee8fb;
  color: #8565b6;
}
.tone-4 {
  background: #e3edf4;
  color: #537d9a;
}
.thread-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 4px;
}
.thread-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.thread-top strong {
  font-size: 14px;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.thread-top time {
  font-size: 10px;
  color: #8993a3;
  flex-shrink: 0;
}
.thread-preview {
  font-size: 12px;
  color: #7a8698;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 20px;
}
.thread-status {
  position: absolute;
  right: 18px;
  bottom: 13px;
  font-size: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c9d0d9;
}
.thread-status.enabled {
  background: #2ab58c;
}
.list-footer {
  font-size: 10px;
  display: flex;
  gap: 7px;
  align-items: center;
  color: #7a8698;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2ab58c;
}
.chat-workspace {
  background: #edf0f5;
  min-width: 0;
  min-height: 0;
}
#chat-empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: #758195;
  padding: 30px;
}
#chat-empty h2 {
  font-size: 23px;
  color: #243651;
  letter-spacing: -0.5px;
  margin: 24px 0 4px;
}
#chat-empty p {
  font-size: 13px;
  line-height: 1.8;
}
.empty-art {
  height: 108px;
  width: 108px;
  display: grid;
  place-items: center;
  background: #e1eaff;
  border: 12px solid #e8eefb;
  border-radius: 30px;
  color: #0068ff;
}
.empty-art svg {
  width: 48px;
  height: 48px;
  stroke-width: 1.3;
}
#chat-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.chat-header {
  height: 76px;
  display: flex;
  align-items: center;
  padding: 12px 24px;
  gap: 12px;
  background: #fff;
  border-bottom: 1px solid #dce1e9;
  flex-shrink: 0;
}
.chat-identity {
  min-width: 0;
  flex: 1;
}
.chat-identity h2 {
  font-size: 17px;
  margin: 0 0 2px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-identity p {
  margin: 0;
  color: #7a8698;
  font-size: 11px;
}
.chat-header-actions {
  display: flex;
  gap: 12px;
}
.chat-body {
  display: flex;
  min-height: 0;
  flex: 1;
  position: relative;
}
.chat-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
}
.messages {
  height: auto;
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #edf0f5;
  border-radius: 0;
  padding: 20px 32px 28px;
  margin: 0;
  scrollbar-width: thin;
}
.bubble {
  width: fit-content;
  max-width: min(72%, 620px);
  padding: 12px 15px;
  background: #fff;
  border: 1px solid #e1e5ec;
  border-radius: 9px;
  box-shadow: 0 1px 2px #182b4907;
  margin: 8px 0;
  line-height: 1.6;
  font-size: 14px;
}
.bubble.out {
  background: #dcecff;
  border-color: #cbdff8;
}
.bubble small {
  font-size: 10px;
  color: #8b97a7;
  margin-top: 6px;
  text-align: right;
}
.day-divider {
  text-align: center;
  font-size: 10px;
  color: #718096;
  margin: 16px 0 20px;
}
.day-divider::before,
.day-divider::after {
  content: "";
  display: inline-block;
  width: 30px;
  border-top: 1px solid #d1d8e2;
  margin: 0 12px;
  vertical-align: middle;
}
.media-bubble .message-text {
  font-size: 12px;
  color: #7a8698;
}
.sticker-bubble,
.sticker-bubble.out {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.sticker-bubble .message-text,
.sticker-bubble .media-link {
  display: none;
}
.sticker-bubble .chat-image {
  max-height: 180px;
  max-width: 200px;
}
.chat-image {
  margin: 6px 0;
  max-height: 390px;
  border-radius: 7px;
}
.composer {
  background: white;
  border-top: 1px solid #dce1e9;
  position: relative;
  flex-shrink: 0;
}
.composer-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-bottom: 1px solid #f0f2f6;
  color: #40536f;
}
.composer-hint {
  font-size: 10px;
  color: #97a1af;
  margin-left: 6px;
}
.bot-status {
  margin-left: auto;
  color: #758195;
  font-size: 10px;
}
#send-form {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  margin: 0;
}
#send-form textarea {
  resize: none;
  border: 0;
  padding: 4px 0;
  min-height: 50px;
  max-height: 140px;
  background: white;
  font-size: 14px;
  box-shadow: none;
}
#send-form textarea:focus {
  outline: none;
}
.send-button {
  height: 40px;
  width: 42px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  padding: 10px;
  border: 0;
  border-radius: 8px;
}
.send-button:hover {
  background: #005be0;
  color: white;
}
#emoji-picker {
  position: absolute;
  bottom: 100%;
  left: 16px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 5px 20px #182b4915;
  border-radius: 10px;
  z-index: 2;
}
#emoji-picker button {
  font-size: 23px;
  border: 0;
  padding: 6px;
  background: none;
}
#conversation-details {
  position: static;
  background: #fff;
  border-left: 1px solid var(--line);
  width: 270px;
  min-width: 270px;
  padding: 22px 18px;
  overflow: auto;
  display: block;
  text-align: center;
}
#conversation-details h3 {
  font-size: 14px;
  margin: 0 0 24px;
}
#conversation-details > .avatar {
  height: 64px;
  width: 64px;
  margin: 0 auto 12px;
  font-size: 22px;
}
#detail-name {
  display: block;
  font-size: 15px;
}
.detail-section {
  border-top: 1px solid var(--line);
  text-align: left;
  padding-top: 14px;
  margin-top: 20px;
}
.detail-section h4 {
  font-size: 12px;
  font-weight: 650;
  margin: 0 0 12px;
}
.detail-section .check {
  font-size: 12px;
}
.detail-section .small {
  font-size: 11px;
  line-height: 1.7;
}
.detail-section button {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  font-size: 12px;
  padding: 9px;
}
#simulate-form {
  text-align: left;
  font-size: 12px;
}
#simulate-form input {
  font-size: 12px;
}
#history-result:empty {
  display: none;
}
#history-result {
  font-size: 11px;
  background: #f7faff;
  color: #547191;
  padding: 7px 20px;
  border-bottom: 1px solid #e1e9f6;
}
#message-search-wrap {
  background: white;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
}
#message-search-wrap input {
  font-size: 13px;
  padding: 8px;
}
.banner {
  background: #edf4ff;
  border-color: #d9e7ff;
}
.tag {
  background: #edf4ff;
  color: #0068ff;
}
.intro {
  background: #075ce5;
}
.intro .eyebrow {
  color: #bed7ff;
}
.intro-note {
  border-color: #6f9eea;
}
.intro h1 {
  letter-spacing: -1.5px;
}
#back-threads {
  display: none;
}
#toast {
  background: #203752;
}
.card {
  border-color: #e0e5ee;
  box-shadow: 0 2px 5px #182b4903;
}
.number {
  font-family: inherit;
  font-size: 36px;
  font-weight: 600;
}
@media (min-width: 1450px) {
  .inbox {
    grid-template-columns: 360px minmax(0, 1fr);
  }
}
@media (max-width: 1100px) {
  #conversation-details {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 2;
    box-shadow: -4px 0 20px #182b4910;
  }
  .inbox {
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .composer-hint {
    display: none;
  }
  .chat-header {
    padding: 12px 18px;
  }
  .messages {
    padding: 16px 20px;
  }
}
@media (max-width: 700px) {
  header {
    padding-left: 74px;
    height: 44px;
    padding-right: 12px;
  }
  header .logo {
    font-size: 15px;
  }
  .workspace-tag,
  #header-quota {
    display: none;
  }
  .shell {
    grid-template-columns: 60px minmax(0, 1fr);
  }
  .shell > aside {
    width: 60px;
    padding: 14px 5px;
  }
  .rail-avatar {
    height: 38px;
    width: 38px;
  }
  .shell nav button {
    width: 50px;
    height: 48px;
  }
  .inbox-mode .shell {
    height: calc(100dvh - 44px);
  }
  .shell main {
    padding: 22px;
  }
  .inbox {
    grid-template-columns: 1fr;
  }
  .chat-workspace {
    display: none;
  }
  .mobile-chat .thread-list {
    display: none;
  }
  .mobile-chat .chat-workspace {
    display: block;
  }
  .chat-header {
    height: 66px;
    padding: 10px;
    gap: 8px;
  }
  .chat-header .avatar {
    height: 36px;
    width: 36px;
    font-size: 12px;
  }
  .chat-identity h2 {
    font-size: 15px;
  }
  .chat-identity p {
    font-size: 10px;
  }
  .chat-header-actions {
    gap: 0;
  }
  .chat-header-actions .icon-button {
    width: 30px;
  }
  .messages {
    padding: 12px;
  }
  .bubble {
    max-width: 90%;
    font-size: 13px;
  }
  .bot-status {
    display: none;
  }
  #send-form {
    padding: 12px;
    gap: 8px;
  }
  .composer-toolbar {
    padding: 5px 8px;
  }
  #back-threads {
    display: inline-flex;
  }
  .list-heading {
    padding: 18px;
  }
  .chat-image {
    max-height: 280px;
  }
  #conversation-details {
    width: min(270px, 100%);
    min-width: 0;
  }
  .auth-panel {
    padding: 24px;
  }
  .intro h1 {
    font-size: 32px;
  }
}
.avatar {
  position: relative;
  overflow: hidden;
}
.avatar img {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
}
.thread .avatar {
  font-size: 14px;
}
#older-messages {
  font-size: 11px;
  align-self: center;
  margin: 8px;
  padding: 5px 14px;
  background: #ffffffaa;
  border-color: #dce3ed;
  color: #547191;
}
.list-footer {
  line-height: 1.5;
  min-height: 42px;
}
/* Incremental conversation history and compact mobile navigation */
.chat-content {
  position: relative;
}
#messages {
  overflow-anchor: none;
  overscroll-behavior: contain;
  scroll-behavior: auto;
}
#new-message-indicator {
  position: absolute;
  right: 24px;
  bottom: 150px;
  z-index: 4;
  border: 1px solid #cee0ff;
  box-shadow: 0 3px 14px #1a438522;
  background: #fff;
  color: #0068ff;
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
}
#new-message-indicator:hover {
  background: #edf4ff;
}
.chat-image {
  min-width: 80px;
  min-height: 60px;
}
.sticker-bubble .chat-image {
  height: 160px;
  object-fit: contain;
}
.chat-media {
  min-height: 44px;
}
#older-messages {
  margin: 4px;
  min-height: 28px;
}
#send-form textarea {
  font-size: 15px;
}
.thread-list,
#messages,
#conversation-details {
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}
@media (max-width: 700px) {
  #workspace.inbox-mode {
    height: var(--app-height, 100dvh);
  }
  header {
    padding: 0 14px;
    height: 48px;
  }
  header .actions {
    gap: 8px;
  }
  header #logout {
    min-height: 32px;
  }
  .shell {
    display: block;
    min-height: calc(var(--app-height, 100dvh) - 48px);
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }
  .shell > aside {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding: 4px 6px env(safe-area-inset-bottom, 0px);
    flex-direction: row;
    gap: 0;
    border-top: 1px solid #dce4ee;
    background: #fff;
    z-index: 7;
  }
  .rail-avatar {
    display: none;
  }
  .shell nav {
    flex-direction: row;
    gap: 0;
    justify-content: space-around;
    overflow: visible;
  }
  .shell nav button {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 20%;
    height: 50px;
    border-radius: 8px;
    color: #7b879a;
    padding: 4px 0;
    min-width: 0;
  }
  .shell nav button svg {
    width: 21px;
    height: 21px;
  }
  .shell nav button span {
    display: block;
    font-size: 9px;
    line-height: 1;
    white-space: nowrap;
  }
  .shell nav button.active {
    background: #edf4ff;
    color: #0068ff;
  }
  .shell nav button:hover {
    background: #edf4ff;
  }
  .inbox-mode .shell {
    height: calc(var(--app-height, 100dvh) - 48px);
    min-height: 0;
  }
  .inbox-mode main {
    height: 100%;
  }
  .inbox-mode [data-page="inbox"] {
    height: 100%;
  }
  main {
    padding: 18px !important;
  }
  .inbox-mode main {
    padding: 0 !important;
  }
  .chat-header {
    height: 64px;
  }
  .chat-identity {
    min-width: 0;
  }
  .chat-identity p {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .chat-header .icon-button {
    min-width: 34px;
    min-height: 40px;
  }
  .thread {
    min-height: 80px;
    padding: 13px 16px;
  }
  .thread-top strong {
    font-size: 15px;
  }
  .thread-preview {
    font-size: 13px;
  }
  .list-heading {
    padding: 16px;
  }
  .list-heading h1 {
    font-size: 22px;
  }
  .list-heading .icon-button {
    width: 42px;
    height: 42px;
  }
  .search-wrap input {
    font-size: 16px;
  }
  .list-account select {
    font-size: 14px;
    min-height: 36px;
  }
  .list-filters select {
    font-size: 13px;
    min-height: 38px;
  }
  .filter-tabs button {
    min-height: 42px;
    font-size: 13px;
  }
  .list-footer {
    font-size: 11px;
    min-height: 40px;
  }
  .messages {
    padding: 10px 12px 18px;
  }
  .bubble {
    font-size: 15px;
    max-width: 88%;
    padding: 10px 12px;
  }
  .bubble small {
    font-size: 10px;
  }
  .composer {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  #send-form {
    padding: 10px 12px;
    min-height: 72px;
  }
  #send-form textarea {
    font-size: 16px;
    min-height: 40px;
    max-height: 96px;
  }
  .composer-toolbar {
    padding: 4px 10px;
    min-height: 42px;
  }
  .composer-toolbar .icon-button {
    min-height: 38px;
    min-width: 38px;
  }
  .send-button {
    height: 42px;
    width: 42px;
  }
  #new-message-indicator {
    right: 14px;
    bottom: 130px;
    max-width: 80%;
    font-size: 12px;
    padding: 10px 14px;
  }
  #conversation-details {
    position: absolute;
    inset: 0;
    z-index: 6;
    min-width: 0;
    width: 100%;
    padding: 20px;
    box-shadow: none;
  }
  .chat-body.details-open .chat-content {
    visibility: hidden;
  }
  .detail-section button {
    min-height: 44px;
    font-size: 14px;
  }
  .detail-section .check {
    min-height: 42px;
    font-size: 14px;
  }
  .detail-section input[type="checkbox"] {
    width: 18px;
    height: 18px;
  }
  .detail-close {
    float: right;
    min-width: 40px;
    min-height: 40px;
  }
  .keyboard-open .shell > aside {
    display: none;
  }
  .keyboard-open .shell {
    padding-bottom: 0;
  }
  .auth {
    min-height: var(--app-height, 100dvh);
  }
  .auth input,
  .auth select {
    font-size: 16px;
  }
  .columns {
    gap: 12px;
  }
  .row {
    flex-wrap: wrap;
  }
  .card {
    padding: 16px;
  }
  .actions {
    gap: 8px;
  }
  #toast {
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    font-size: 13px;
    width: max-content;
    max-width: 90vw;
  }
}
/* Customer care workspace: shared semantic tokens, light and dark. */
:root {
  --app-bg: #f5f7fb;
  --surface: #fff;
  --surface-soft: #f0f4f9;
  --surface-hover: #edf3fc;
  --chat-bg: #edf1f6;
  --text: #1b2b44;
  --text-secondary: #63748b;
  --border: #e1e7ef;
  --brand: #2563eb;
  --brand-soft: #eaf1ff;
  --outgoing: #deebff;
  --warning: #995515;
  --warning-bg: #fff3dc;
  --success: #187756;
  --success-bg: #e4f4ed;
  --nav-bg: #fff;
  --shadow: 0 2px 10px #172e4e06;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --app-bg: #101722;
  --surface: #172130;
  --surface-soft: #1d2a3c;
  --surface-hover: #24344b;
  --chat-bg: #101925;
  --text: #e3eaf5;
  --text-secondary: #a2b0c4;
  --border: #2c3b50;
  --brand: #86adff;
  --brand-soft: #233e69;
  --outgoing: #23436c;
  --warning: #f2bd73;
  --warning-bg: #3f3020;
  --success: #79d4b0;
  --success-bg: #193e35;
  --nav-bg: #141e2d;
  --shadow: 0 2px 12px #0002;
  color-scheme: dark;
}
:root {
  background: var(--app-bg);
  color: var(--text);
}
body {
  background: var(--app-bg);
  color: var(--text);
}
button,
input,
select,
textarea {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}
button:hover {
  background: var(--surface-hover);
}
button.primary,
.send-button {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.send-button:hover,
button.primary:hover {
  background: #1d55d4;
}
.muted,
.eyebrow,
.small.muted {
  color: var(--text-secondary);
}
input::placeholder,
textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.8;
}
header {
  background: var(--surface);
  border-color: var(--border);
  padding-left: 232px;
  height: 58px;
  gap: 12px;
}
header .logo {
  font-size: 19px;
  color: var(--text);
}
header .actions {
  gap: 14px;
}
.workspace-tag {
  color: var(--text-secondary);
}
#header-quota {
  background: var(--brand-soft);
  color: var(--brand);
}
.theme-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 11px;
  color: var(--text-secondary);
}
.theme-control select {
  display: inline-block;
  width: 130px;
  margin: 0;
  font-size: 12px;
  padding: 6px 8px;
  background: var(--surface-soft);
  border-color: var(--border);
}
.shell {
  grid-template-columns: 208px minmax(0, 1fr);
  min-height: calc(100dvh - 58px);
}
.shell > aside {
  width: 208px;
  background: var(--nav-bg);
  border-right: 1px solid var(--border);
  padding: 22px 14px;
  gap: 32px;
  align-items: flex-start;
}
.rail-avatar {
  background: var(--brand-soft);
  border-color: var(--border);
  color: var(--brand);
  margin-left: 10px;
}
.shell nav {
  gap: 6px;
}
.shell nav button {
  width: 100%;
  height: 44px;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}
.shell nav button svg {
  width: 20px;
  height: 20px;
}
.shell nav button span {
  display: inline;
}
.shell nav button.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 650;
}
.shell nav button:hover {
  background: var(--surface-hover);
}
.shell main {
  padding: 34px 40px;
  max-width: 1700px;
}
h1 {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -1px;
}
h2 {
  font-size: 17px;
  font-weight: 650;
}
h3 {
  font-weight: 600;
}
.card {
  border-color: var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: 12px;
  margin: 18px 0;
}
.banner {
  background: var(--brand-soft);
  border-color: var(--border);
}
.tag,
.soft-badge {
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}
.page-heading h1 {
  margin: 8px 0 10px;
}
.page-heading p {
  margin-bottom: 0;
}
.page-heading > .primary {
  white-space: nowrap;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.section-heading h2 {
  margin: 0;
}
.text-button {
  border: 0;
  background: transparent;
  padding: 5px 0;
  color: var(--brand);
  font-size: 12px;
  white-space: nowrap;
}
.crm-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12px;
}
.metric-value {
  font-size: 33px;
  letter-spacing: -1px;
  line-height: 1.2;
  font-weight: 650;
  color: var(--text);
}
.dashboard-columns {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}
.crm-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.crm-list-row:last-child {
  border: 0;
}
.crm-list-row strong {
  font-size: 13px;
}
.crm-list-row p {
  margin: 4px 0 0;
}
.crm-list-row > select {
  width: 135px;
  font-size: 12px;
  padding: 8px;
}
.crm-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.crm-identity > div {
  min-width: 0;
}
.crm-identity strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 250px;
}
.crm-identity .small {
  display: block;
}
.crm-identity .avatar {
  width: 38px;
  height: 38px;
  font-size: 12px;
}
.crm-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 5px;
  padding: 4px 7px;
  background: var(--surface-soft);
  color: var(--text-secondary);
  width: fit-content;
  white-space: nowrap;
}
.segment-vip {
  background: var(--warning-bg);
  color: var(--warning);
}
.segment-potential,
.stage-contacting {
  background: var(--brand-soft);
  color: var(--brand);
}
.segment-customer,
.stage-resolved {
  background: var(--success-bg);
  color: var(--success);
}
.stage-waiting {
  background: var(--warning-bg);
  color: var(--warning);
}
.crm-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.pipeline-row {
  margin-top: 18px;
}
.pipeline-row progress {
  height: 7px;
  margin-top: 8px;
  accent-color: var(--brand);
}
.pipeline-row strong {
  font-size: 12px;
}
.crm-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 20px 0;
}
.crm-toolbar > input {
  flex: 1;
  min-width: 180px;
  max-width: 400px;
}
.crm-toolbar > select {
  width: auto;
  min-width: 155px;
  font-size: 13px;
}
.crm-toolbar .check {
  font-size: 12px;
  margin: 0;
}
.customer-table-wrap {
  padding: 0 20px;
  overflow: auto;
}
.customer-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  white-space: nowrap;
}
.customer-table th {
  font-size: 11px;
  letter-spacing: 0.2px;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 16px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.customer-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
}
.customer-table tbody tr:hover {
  background: var(--surface-soft);
}
.customer-table select {
  font-size: 12px;
  min-width: 135px;
  padding: 7px 9px;
  background: var(--surface);
}
#customer-load-more {
  margin: 16px 0;
}
.task-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.task-column {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  min-height: 300px;
}
.task-column > .section-heading {
  margin: 0 0 16px;
}
.task-column h2 {
  font-size: 14px;
}
.count-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--text-secondary);
}
.task-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 12px;
}
.task-card h3 {
  font-size: 14px;
  margin: 10px 0;
  overflow-wrap: anywhere;
}
.task-card > p {
  margin: 7px 0;
}
.task-card > select {
  padding: 8px;
  font-size: 12px;
  margin-top: 12px;
}
.task-priority {
  font-size: 10px;
  color: var(--text-secondary);
}
.task-priority.high {
  color: var(--warning);
  background: var(--warning-bg);
  padding: 3px 6px;
  border-radius: 4px;
}
.task-customer-link {
  font-size: 11px;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 5px 8px;
  border: 0;
  margin-bottom: 7px;
  max-width: 100%;
  white-space: normal;
  text-align: left;
}
.task-empty {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  border: 1px dashed var(--border);
  padding: 30px 10px;
  border-radius: 8px;
}
.overdue {
  color: var(--warning);
  font-weight: 600;
}
.detail-section label {
  font-size: 11px;
  color: var(--text-secondary);
  margin: 12px 0;
}
.detail-section select,
.detail-section input,
.detail-section textarea {
  font-size: 12px;
  padding: 8px;
}
.detail-section .primary {
  margin: 12px 0 8px;
}
.detail-section h4 {
  color: var(--text);
}
#customer-open-tasks {
  padding-top: 8px;
}
.inbox-crm-filter {
  display: flex;
  gap: 6px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
}
.inbox-crm-filter select {
  width: 50%;
  font-size: 10px;
  padding: 6px;
  background: var(--surface-soft);
}
.thread .crm-badge {
  font-size: 9px;
  padding: 2px 5px;
}
.inbox-mode .shell {
  height: calc(100dvh - 58px);
}
.thread-list,
.list-heading,
.list-footer,
.list-filters,
.list-filters select,
.chat-header,
.composer,
#send-form textarea,
#conversation-details,
#message-search-wrap,
#emoji-picker {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.list-heading h1,
.chat-identity h2 {
  color: var(--text);
}
.search-wrap,
.list-account select {
  background: var(--surface-soft);
  color: var(--text-secondary);
}
.search-wrap input {
  background: transparent;
  color: var(--text);
}
.list-account select {
  border-color: var(--border);
}
.filter-tabs button {
  background: transparent;
  color: var(--text-secondary);
}
.filter-tabs button.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.thread {
  background: var(--surface);
  color: var(--text);
}
.thread.selected {
  background: var(--brand-soft);
}
.thread:hover {
  background: var(--surface-hover);
}
.thread-preview,
.thread-top time,
.chat-identity p,
.composer-hint,
.bot-status,
.list-footer {
  color: var(--text-secondary);
}
.chat-workspace,
.messages {
  background: var(--chat-bg);
}
.bubble {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--shadow);
}
.bubble.out {
  background: var(--outgoing);
  border-color: var(--border);
}
.bubble small,
.media-bubble .message-text,
.day-divider {
  color: var(--text-secondary);
}
.sticker-bubble,
.sticker-bubble.out {
  background: transparent;
  border: 0;
  box-shadow: none;
}
.composer-toolbar,
.chat-header {
  border-color: var(--border);
}
.media-link,
.text-button {
  color: var(--brand);
}
#chat-empty,
#chat-empty p {
  color: var(--text-secondary);
}
#chat-empty h2 {
  color: var(--text);
}
.empty-art {
  background: var(--brand-soft);
  border-color: var(--surface);
  color: var(--brand);
}
.detail-section,
.crm-list-row,
.row {
  border-color: var(--border);
}
#older-messages,
#new-message-indicator {
  background: var(--surface);
  color: var(--brand);
  border-color: var(--border);
}
#history-result {
  background: var(--brand-soft);
  color: var(--text-secondary);
  border-color: var(--border);
}
#conversation-details {
  border-color: var(--border);
}
.note {
  background: var(--warning-bg);
  color: var(--warning);
}
.empty {
  color: var(--text-secondary);
}
#toast {
  background: var(--text);
  color: var(--surface);
}
details > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.intro {
  background: #154bba;
  color: #fff;
}
.intro .eyebrow {
  color: #c5d8ff;
}
.auth-panel {
  color: var(--text);
}
.auth {
  background: var(--app-bg);
}
@media (max-width: 1250px) {
  .shell {
    grid-template-columns: 176px minmax(0, 1fr);
  }
  .shell > aside {
    width: 176px;
    padding: 20px 10px;
  }
  .shell nav button {
    font-size: 12px;
    gap: 10px;
    padding: 0 10px;
  }
  header {
    padding-left: 198px;
  }
  .shell main {
    padding: 28px;
  }
  .workspace-tag {
    display: none;
  }
  .crm-metrics {
    gap: 12px;
  }
  .metric-card {
    padding: 18px;
  }
  .dashboard-columns {
    grid-template-columns: 1fr;
  }
  .task-board {
    gap: 10px;
  }
  .task-column {
    padding: 12px;
  }
  .task-card {
    padding: 12px;
  }
}
@media (max-width: 900px) {
  .crm-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-heading {
    align-items: flex-start;
  }
  .task-board {
    grid-template-columns: 1fr;
  }
  .task-column {
    min-height: 150px;
  }
  .crm-list-row {
    flex-wrap: wrap;
  }
  .crm-list-row .crm-identity {
    flex: 1;
    min-width: 180px;
  }
  .theme-control > span {
    display: none;
  }
  header .actions {
    gap: 8px;
  }
}
@media (max-width: 700px) {
  header {
    height: 48px;
    padding: 0 12px;
  }
  header .logo {
    font-size: 15px;
  }
  header #logout {
    font-size: 10px;
    padding: 4px 7px;
  }
  header .actions {
    gap: 6px;
  }
  .theme-control select {
    font-size: 11px;
    width: 106px;
    padding: 5px;
    min-height: 32px;
  }
  header #user-name {
    display: none;
  }
  .shell {
    display: block;
  }
  .shell > aside {
    height: calc(62px + env(safe-area-inset-bottom, 0px));
    width: 100%;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-right: 0;
    padding: 4px 5px env(safe-area-inset-bottom, 0px);
    overflow-x: auto;
  }
  .shell nav {
    width: max-content;
    min-width: 100%;
    display: flex;
    flex-direction: row;
    gap: 3px;
    justify-content: flex-start;
  }
  .shell nav button {
    width: 68px;
    min-width: 68px;
    height: 50px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 4px;
    font-size: 9px;
  }
  .shell nav button span {
    font-size: 9px;
    display: block;
    line-height: 1.2;
  }
  .shell nav button svg {
    width: 20px;
    height: 20px;
  }
  .shell nav button.active {
    background: var(--brand-soft);
    color: var(--brand);
  }
  .inbox-mode .shell {
    height: calc(var(--app-height, 100dvh) - 48px);
  }
  .shell main {
    padding: 20px 16px;
  }
  .page-heading {
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .page-heading .eyebrow {
    font-size: 10px;
  }
  .crm-metrics {
    gap: 10px;
  }
  .metric-card {
    padding: 15px;
    gap: 8px;
    font-size: 11px;
  }
  .metric-value {
    font-size: 28px;
  }
  .metric-card .small {
    font-size: 10px;
  }
  .crm-toolbar {
    gap: 9px;
  }
  .crm-toolbar > input {
    max-width: none;
    flex-basis: 100%;
    font-size: 16px;
  }
  .crm-toolbar > select {
    min-width: 0;
    flex: 1;
    font-size: 13px;
  }
  .customer-table-wrap {
    padding: 0 8px;
  }
  .customer-table th,
  .customer-table td {
    padding: 12px 8px;
  }
  .crm-identity strong {
    max-width: 170px;
  }
  .section-heading {
    gap: 8px;
  }
  .section-heading h2 {
    font-size: 15px;
  }
  .crm-list-row {
    gap: 10px;
  }
  .crm-list-row > select {
    width: 120px;
  }
  .task-board {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .task-card {
    padding: 16px;
  }
  .task-column {
    padding: 14px;
  }
  .task-card > select {
    font-size: 14px;
    min-height: 40px;
  }
  .task-customer-link {
    font-size: 12px;
  }
  .inbox-crm-filter select {
    font-size: 11px;
    min-height: 32px;
  }
  .detail-section label {
    font-size: 12px;
  }
  .detail-section select,
  .detail-section input,
  .detail-section textarea {
    font-size: 16px;
    padding: 10px;
  }
  .crm-badge {
    font-size: 10px;
  }
  .dashboard-columns {
    gap: 0;
  }
  .crm-list-row .avatar {
    width: 34px;
    height: 34px;
  }
  .inbox-mode main {
    padding: 0 !important;
  }
  .card {
    border-radius: 10px;
  }
  .thread-list {
    border-color: var(--border);
  }
}
@media (max-width: 700px) {
  .customer-table-wrap {
    padding: 10px;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }
  .customer-table,
  .customer-table tbody {
    display: block;
    white-space: normal;
  }
  .customer-table thead {
    display: none;
  }
  .customer-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
  }
  .customer-table td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    font-size: 12px;
  }
  .customer-table td:first-child,
  .customer-table td:last-child {
    grid-column: 1/-1;
  }
  .customer-table td:not(:first-child):not(:last-child)::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 5px;
  }
  .customer-table select {
    min-width: 0;
    width: 100%;
    font-size: 13px;
    padding: 9px;
  }
  .customer-table td:last-child .text-button {
    width: 100%;
    padding: 10px;
    background: var(--brand-soft);
    border-radius: 6px;
  }
  .customer-table .crm-identity strong {
    font-size: 14px;
    max-width: 240px;
  }
  .customer-table .avatar {
    height: 42px;
    width: 42px;
  }
  .customer-table .crm-identity .small {
    font-size: 11px;
  }
  .task-column > .section-heading {
    position: sticky;
    top: 0;
    background: var(--surface-soft);
    padding: 3px 0;
    z-index: 1;
  }
}
@media (max-width: 700px) {
  .shell > aside {
    scrollbar-width: none;
  }
  .shell > aside::-webkit-scrollbar {
    display: none;
  }
  .crm-toolbar > select {
    flex: 1 1 calc(50% - 6px);
  }
  .crm-toolbar > .check {
    flex-basis: 100%;
    min-height: 30px;
  }
}
