:root {
  --navy: #0b1422;
  --blue: #0877ed;
  --bg: #f5f5f7;
  --text: #15171b;
  --muted: #747984;
  --line: #e3e6eb;
  --green: #0ca678;
  --amber: #d98305;
  --red: #df3d4a;
  --shadow: 0 16px 45px rgba(22, 33, 51, 0.08);
  --surface: #fff;
  --surface-soft: #f8f9fb;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'PingFang SC',
    'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.sidebar {
  width: 238px;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at 16% 5%, rgba(20, 119, 237, 0.2), transparent 30%),
    linear-gradient(180deg, #101b2b 0%, #0b1422 58%, #080f1a 100%);
  color: #aeb9c9;
}

.brand {
  height: 78px;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.brand-logo,
.brand-logo img {
  width: 40px !important;
  height: 40px !important;
}

.brand-logo {
  position: static !important;
  flex: 0 0 40px !important;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 11px !important;
  background: #111 !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.brand-logo img {
  position: static !important;
  max-width: 100% !important;
  opacity: 1 !important;
  object-fit: cover;
}

.brand b {
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1.8px !important;
}

.brand small {
  margin-top: 3px;
  color: #748399;
  font-size: 9px !important;
  font-weight: 650;
  letter-spacing: 1.25px;
}

.sidebar nav {
  gap: 4px;
  padding: 13px 11px 18px;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar nav::-webkit-scrollbar {
  display: none;
}

.sidebar nav button {
  height: 44px;
  gap: 9px;
  padding: 0 9px;
  border-radius: 11px;
  color: #98a6b9;
  font-size: 12px;
  font-weight: 650;
}

.sidebar nav button:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}

.sidebar nav button.active {
  border-color: rgba(67, 146, 244, 0.3);
  background: linear-gradient(100deg, rgba(8, 119, 237, 0.3), rgba(8, 119, 237, 0.12));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

.sidebar nav button::before {
  inset: 8px auto 8px 0;
  width: 2px;
  background: #48a2ff;
}

.nav-icon {
  width: 29px;
  height: 29px;
  flex-basis: 29px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
}

.sidebar nav button.active .nav-icon {
  border: 0;
  background: #0877ed;
  box-shadow: 0 5px 14px rgba(8, 119, 237, 0.32);
}

.sidebar nav em {
  border: 2px solid #14243a;
  box-shadow: none;
}

.side-foot {
  padding: 10px 12px;
  border-top-color: rgba(255, 255, 255, 0.07);
  background: rgba(2, 8, 15, 0.18);
}

.side-foot p {
  padding: 6px;
}

main {
  margin-left: 238px;
  background: var(--bg);
}

main > header {
  height: 76px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(21, 23, 27, 0.08);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 3px 20px rgba(26, 38, 55, 0.025);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

main > header h1 {
  margin-bottom: 4px;
  color: #15171b;
  font-size: 22px;
  font-weight: 760;
  letter-spacing: -0.35px;
}

main > header p {
  color: #818691;
  font-size: 11px;
}

.header-actions,
.system-tools {
  align-items: center;
}

.system-button,
.icon-button {
  border-color: #e2e5e9;
  background: #fff;
  color: #535b67;
  box-shadow: 0 2px 8px rgba(22, 31, 45, 0.035);
}

.system-button:hover,
.icon-button:hover,
.secondary:hover {
  border-color: #a9cdf7;
  color: #0877ed;
}

.primary,
.secondary,
.danger,
.danger-outline {
  min-height: 38px;
  border-radius: 9px;
  font-weight: 700;
}

.primary {
  border-color: #0877ed;
  background: #0877ed;
  box-shadow: 0 7px 18px rgba(8, 119, 237, 0.18);
}

.primary:hover {
  border-color: #006bd9;
  background: #006bd9;
}

.secondary {
  border-color: #dfe3e8;
  background: #fff;
  color: #303641;
}

.dispatch-control-scope {
  display: grid;
  gap: 5px;
  margin-bottom: 16px;
  padding: 14px 15px;
  border: 1px solid #d9e5f4;
  border-radius: 11px;
  background: #f6f9fd;
  color: #53647a;
}

.dispatch-control-scope span,
.dispatch-control-scope small {
  font-size: 11px;
}

.dispatch-control-scope b {
  color: #172b47;
  font-size: 14px;
}

.dispatch-control-ack {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid #ecd7a3;
  border-radius: 10px;
  background: #fffaf0;
  color: #536070;
  font-size: 12px;
  line-height: 1.5;
}

.dispatch-control-ack input {
  margin-top: 2px;
}

#stopAll.dispatch-is-stopped {
  border-color: #8bcbb2;
  background: #edf9f4;
  color: #087a55;
}

.view {
  padding: 22px 28px 42px;
}

.panel,
.metrics article,
.month-overview,
.month-metrics p,
.v4-head,
.reply-library,
.rule-list,
.quick-item,
.rule-item,
.seat,
.conversation,
.messages,
.trace,
.drawer {
  border-color: #e5e8ec;
  box-shadow: 0 9px 28px rgba(22, 33, 51, 0.045);
}

.panel,
.month-overview,
.v4-head,
.reply-library,
.rule-list,
.conversation,
.messages,
.trace {
  border-radius: 14px;
}

.metrics article,
.month-metrics p,
.quick-item,
.rule-item,
.seat {
  border-radius: 12px;
}

input,
select,
textarea {
  border-color: #dfe3e8;
  background: #fff;
  color: #1d222b;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #79b4f4 !important;
  outline: 3px solid rgba(8, 119, 237, 0.1);
}

.login-screen {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: none;
  place-items: center;
  overflow: auto;
  padding: 32px;
  background: radial-gradient(circle at 82% 12%, rgba(8, 119, 237, 0.1), transparent 27%), #f5f5f7;
}

.login-screen.open {
  display: grid;
}

.login-shell {
  width: min(1120px, 96vw);
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  overflow: hidden;
  border: 1px solid rgba(18, 26, 38, 0.07);
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 36px 100px rgba(31, 43, 61, 0.16);
}

.login-intro {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 42px 46px;
  background:
    radial-gradient(circle at 79% 70%, rgba(40, 148, 255, 0.38), transparent 27%),
    radial-gradient(circle at 20% 8%, rgba(91, 90, 255, 0.2), transparent 35%),
    linear-gradient(145deg, #111b2c, #07101d 68%, #050b13);
  color: #fff;
}

.login-intro::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, transparent, #000 35%, #000);
}

.login-intro-brand,
.login-copy,
.login-orbit {
  position: relative;
  z-index: 1;
}

.login-intro-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.login-intro-brand img {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}

.login-intro-brand span {
  display: flex;
  flex-direction: column;
}

.login-intro-brand b {
  font-size: 19px;
  letter-spacing: 2.5px;
}

.login-intro-brand small {
  margin-top: 3px;
  color: #8497b0;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.35px;
}

.login-copy {
  margin-top: 82px;
}

.login-copy > p:first-child {
  margin: 0 0 18px;
  color: #91a4bd;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 2.2px;
}

.login-copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(42px, 4.5vw, 64px);
  font-weight: 790;
  line-height: 1.08;
  letter-spacing: -2.8px;
}

.login-copy h1 span {
  background: linear-gradient(100deg, #20a2ff, #7669ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-summary {
  max-width: 470px;
  margin: 22px 0 0;
  color: #aab8ca;
  font-size: 14px;
  line-height: 1.8;
}

.login-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 25px;
}

.login-capabilities span {
  padding: 7px 10px;
  border: 1px solid rgba(120, 178, 248, 0.24);
  border-radius: 999px;
  background: rgba(4, 20, 39, 0.48);
  color: #b9cbe1;
  font-size: 10px;
}

.login-orbit {
  position: absolute;
  right: -96px;
  bottom: -186px;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(84, 171, 255, 0.25);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(68, 171, 255, 0.8), transparent 4%),
    radial-gradient(circle at 55% 25%, rgba(129, 217, 255, 0.4), transparent 2%),
    radial-gradient(circle at 43% 42%, #1a6ba6 0%, #0a355f 23%, #06172d 55%, #020812 72%);
  box-shadow:
    -22px -22px 65px rgba(46, 157, 255, 0.22),
    inset -50px -45px 75px rgba(0, 0, 0, 0.72);
}

.login-orbit::before,
.login-orbit::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(112, 191, 255, 0.25);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.login-orbit::before {
  inset: 80px -65px;
}

.login-orbit::after {
  inset: 35px -110px;
}

.login-orbit i {
  position: absolute;
  z-index: 2;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #96ddff;
  box-shadow: 0 0 18px #55baff;
}

.login-orbit i:nth-child(1) {
  top: 75px;
  left: 78px;
}

.login-orbit i:nth-child(2) {
  top: 102px;
  right: 58px;
}

.login-orbit i:nth-child(3) {
  top: 180px;
  left: 42px;
}

.login-orbit b {
  position: absolute;
  top: 125px;
  left: 105px;
  color: rgba(189, 223, 255, 0.64);
  font-size: 9px;
  letter-spacing: 1.8px;
}

.login-card {
  align-self: center;
  width: 100%;
  max-width: none;
  padding: 64px 62px;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.auth-forms {
  align-self: center;
  width: 100%;
  max-height: 100%;
  overflow: auto;
}

.auth-forms .login-card[hidden] {
  display: none;
}

.register-card {
  padding-top: 34px;
  padding-bottom: 34px;
}

.register-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}

.register-card .terms-check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 9px;
  color: #6d7480;
  line-height: 1.45;
}

.register-card .terms-check input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin: 1px 0 0;
}

.auth-switch {
  width: 100%;
  margin-top: 16px;
  border: 0;
  background: transparent;
  color: #0877e8;
  font-weight: 700;
}

.login-brand {
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
}

.login-brand .login-logo {
  display: none;
}

.login-brand h2 {
  margin: 0 0 6px;
  color: #15171b;
  font-size: 25px;
  font-weight: 780;
  letter-spacing: -0.6px;
}

.login-brand small {
  color: #8b909a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.login-card-intro {
  margin: 0 0 34px;
  color: #7b818c;
  font-size: 12px;
  line-height: 1.65;
}

.auth-portal-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: -12px 0 24px;
  padding: 5px;
  border: 1px solid #dfe7f1;
  border-radius: 14px;
  background: #f3f6fa;
}

.auth-portal-switch > span,
.auth-portal-switch > a {
  position: relative;
  min-width: 0;
  padding: 11px 12px;
  border-radius: 10px;
  color: #667386;
  text-decoration: none;
  transition: 160ms ease;
}

.auth-portal-switch > span.active {
  background: #fff;
  color: #12223a;
  box-shadow: 0 6px 16px rgba(39, 70, 111, 0.11);
}

.auth-portal-switch > a:hover {
  background: #e7effb;
  color: #076fde;
}

.auth-portal-switch b,
.auth-portal-switch small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-portal-switch b {
  font-size: 11px;
}

.auth-portal-switch small {
  margin-top: 3px;
  color: #929eae;
  font-size: 8px;
}

.auth-portal-switch i {
  position: absolute;
  top: 50%;
  right: 8px;
  font-style: normal;
  transform: translateY(-50%);
}

.login-card label {
  gap: 8px;
  margin: 17px 0;
  color: #3f4651;
  font-size: 11px;
  font-weight: 720;
}

.login-card input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  background: #fafbfc;
  font-size: 13px;
}

.login-card input::placeholder {
  color: #adb2ba;
}

.login-card .primary {
  width: 100%;
  height: 49px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
  border-radius: 10px;
  font-size: 13px;
}

.login-card .primary span {
  font-size: 18px;
  line-height: 1;
}

.logout-note {
  margin: 19px 0 0;
  color: #9197a0;
  font-size: 9px;
  text-align: center;
}

.logout-note i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 3px;
  border-radius: 50%;
  background: #13af7c;
  box-shadow: 0 0 0 4px rgba(19, 175, 124, 0.1);
}

body.theme-dark {
  --bg: #0f1319;
  --text: #edf1f7;
  --muted: #929caa;
  --line: #28313d;
  --surface: #171d25;
  --surface-soft: #121820;
}

body.theme-dark main,
body.theme-dark main > header {
  background: #0f1319;
}

body.theme-dark main > header {
  border-bottom-color: #252e39;
}

body.theme-dark main > header h1 {
  color: #f3f6fa;
}

body.theme-dark .login-screen,
body.theme-dark .login-card,
body.theme-dark .login-shell {
  background-color: #fff;
}

body.theme-dark .login-brand h2 {
  color: #15171b;
}

@media (max-width: 1040px) {
  .login-shell {
    min-height: 590px;
    grid-template-columns: minmax(0, 1fr) 390px;
  }

  .login-intro {
    padding: 34px;
  }

  .login-copy {
    margin-top: 68px;
  }

  .login-card {
    padding: 50px 42px;
  }
}

@media (max-width: 820px) {
  .sidebar {
    width: 76px;
  }

  main {
    margin-left: 76px;
  }

  .brand {
    justify-content: center;
    padding: 0;
  }

  .brand > span,
  .side-foot span {
    display: none;
  }

  .side-foot p {
    justify-content: center;
  }

  .login-screen {
    padding: 18px;
  }

  .login-shell {
    width: min(500px, 96vw);
    min-height: 0;
    display: block;
    border-radius: 24px;
  }

  .login-intro {
    min-height: 220px;
    padding: 28px;
  }

  .login-copy {
    margin-top: 32px;
  }

  .login-copy h1 {
    font-size: 36px;
    letter-spacing: -1.6px;
  }

  .login-copy .login-summary,
  .login-capabilities,
  .login-orbit {
    display: none;
  }

  .login-card {
    padding: 34px 30px 36px;
  }
}

.login-card .login-error {
  margin: -4px 0 2px;
  padding: 10px 12px;
  border: 1px solid #f1b9b9;
  border-radius: 9px;
  background: #fff2f2;
  color: #b42318;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

#toasts {
  z-index: 800;
}

.synthetic-task-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.synthetic-task-tag {
  display: inline-flex;
  margin-left: 7px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #fff4d8;
  color: #9a6500;
  font-size: 9px;
  font-style: normal;
  vertical-align: middle;
}

.task-detail-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.task-detail-card h3 {
  margin: 0 0 12px;
}

.task-detail-card pre {
  margin: 0;
  padding: 13px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  border-radius: 9px;
  background: #f4f7fb;
  color: #13263f;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.65;
}

.drawer-assignments {
  display: grid;
  gap: 8px;
}

.drawer-assignments p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: #f4f7fb;
}

.drawer-assignments span {
  display: grid;
  min-width: 0;
}

.drawer-assignments small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.task-status-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 620px) {
  main > header {
    height: auto;
    min-height: 72px;
    padding: 12px 16px;
  }

  .view {
    padding: 16px 14px 34px;
  }

  .system-tools .account-button span,
  #langToggle,
  #headerNew {
    display: none;
  }

  .login-screen {
    align-items: start;
    padding: 12px;
  }

  .login-intro {
    min-height: 190px;
    padding: 24px;
  }

  .login-intro-brand small {
    max-width: 220px;
    line-height: 1.45;
  }

  .login-copy {
    margin-top: 26px;
  }

  .login-copy h1 {
    font-size: 31px;
  }

  .login-card {
    padding: 28px 24px 30px;
  }
}

/* v51 functional UX: task allocation, conversation switching and rule scheduling. */
.allocation-seats {
  min-height: 92px;
}

.allocation-seat {
  position: relative;
  min-width: 0;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.allocation-seat:hover:not(:has(input[type='checkbox']:disabled)) {
  transform: translateY(-1px);
  border-color: #9ac5f5;
}

.allocation-seat.selected,
.allocation-seat:has(input[type='checkbox']:checked) {
  border-color: #80b7f2;
  background: #f1f7ff;
  box-shadow: 0 5px 16px rgba(8, 119, 237, 0.08);
}

.allocation-seat .quota:not([hidden]) {
  width: 72px;
  height: 34px;
  margin-left: auto;
  text-align: right;
}

.allocation-empty {
  grid-column: 1 / -1;
  padding: 26px;
  border: 1px dashed #cfd7e2;
  border-radius: 10px;
  color: #7d8794;
  text-align: center;
}

#chats .chat-grid {
  grid-template-columns: 210px minmax(310px, 350px) minmax(0, 1fr) !important;
}

#chats .conversation {
  position: relative;
  min-height: 76px;
  padding: 13px 42px 13px 16px !important;
  border-left: 3px solid transparent;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

#chats .conversation:hover {
  background: #f3f7fc;
  transform: translateX(2px);
}

#chats .conversation.active {
  border-left-color: #0877ed;
  background: linear-gradient(100deg, #eaf3ff, #f5f9ff);
}

#chats .conversation-list-empty {
  flex: 1;
  min-height: 180px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  padding: 30px 22px;
  color: #8491a1;
  text-align: center;
}

#chats .conversation-list-empty i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #d9e3ee;
  border-radius: 12px;
  background: #fff;
  color: #5f7590;
  font-size: 20px;
  font-style: normal;
}

#chats .conversation-list-empty b {
  color: #4d5a69;
  font-size: 12px;
}

#chats .conversation-list-empty span {
  max-width: 210px;
  font-size: 10px;
  line-height: 1.6;
}

.conversation-arrow {
  position: absolute;
  right: 16px;
  color: #9aa6b4;
  font-size: 22px;
  font-style: normal;
  transition: transform 0.18s ease;
}

.conversation.active .conversation-arrow {
  color: #0877ed;
  transform: translateX(2px);
}

#chats .messages > header {
  min-height: 74px;
  height: auto;
  gap: 12px;
  padding: 10px 16px;
}

#chats .conversation-is-empty > header {
  min-height: 64px;
}

#chats .conversation-is-empty .chat-contact small {
  display: none;
}

#chats .conversation-panel-empty {
  min-height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 36px;
  color: #8592a2;
  text-align: center;
}

#chats .conversation-panel-empty i {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid #d7e1ed;
  border-radius: 16px;
  background: #fff;
  color: #537293;
  box-shadow: 0 8px 24px rgba(35, 65, 96, 0.06);
  font-size: 23px;
  font-style: normal;
}

#chats .conversation-panel-empty h3,
#chats .conversation-panel-empty p {
  margin: 0;
}

#chats .conversation-panel-empty h3 {
  color: #465565;
  font-size: 14px;
}

#chats .conversation-panel-empty p {
  max-width: 340px;
  font-size: 10px;
  line-height: 1.65;
}

#chats #composer[hidden] {
  display: none !important;
}

#chats .chat-assignment[hidden],
#chats .copy-phone-button[hidden],
#chats #intervene[hidden],
#chats #intervene2[hidden] {
  display: none !important;
}

#chats .chat-contact {
  min-width: 180px;
}

#chats .chat-assignment {
  margin-left: auto;
}

#chats .chat-assignment select {
  width: min(230px, 20vw);
}

.conversation-loading {
  min-height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: #7f8b99;
  font-size: 11px;
}

.conversation-loading i {
  width: 28px;
  height: 28px;
  border: 3px solid #dce8f6;
  border-top-color: #0877ed;
  border-radius: 50%;
  animation: conversation-spin 0.75s linear infinite;
}

.conversation-content-enter > * {
  animation: conversation-enter 0.24s ease both;
}

.conversation-content-enter > :nth-child(2) {
  animation-delay: 0.035s;
}

.conversation-content-enter > :nth-child(3) {
  animation-delay: 0.07s;
}

#composer.chat-composer-v31 {
  min-height: 152px;
  padding: 12px 14px !important;
  grid-template-columns: minmax(0, 1fr) !important;
  background: #fff;
}

#composer .chat-compose-tools span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#composer .chat-compose-tools small,
#composer .chat-compose-foot {
  color: #87919f;
  font-size: 9px;
}

#composer .chat-compose-main {
  width: 100%;
  min-width: 0;
}

#composer .chat-compose-main textarea {
  width: auto;
  min-width: 0;
  min-height: 68px;
  resize: vertical;
}

.automation-schedule.schedule-disabled {
  background: #f7f8fa;
}

.automation-schedule.schedule-disabled .automation-weekdays,
.automation-schedule.schedule-disabled .automation-form-grid {
  opacity: 0.45;
}

.automation-schedule input:disabled {
  cursor: not-allowed;
}

@keyframes conversation-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes conversation-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  #chats .chat-grid {
    grid-template-columns: minmax(280px, 330px) minmax(0, 1fr) !important;
  }

  #chats .chat-grid > aside:first-child {
    display: none;
  }
}

@media (max-width: 820px) {
  #chats .chat-grid {
    height: auto !important;
    min-height: 620px !important;
    grid-template-columns: 1fr !important;
  }

  #chats .chat-grid > aside:nth-child(2) {
    max-height: 260px;
    border-bottom: 1px solid var(--line);
  }

  #chats .messages {
    min-height: 520px;
  }

  #chats .messages > header {
    flex-wrap: wrap;
  }

  #chats .chat-assignment select {
    width: 190px;
  }
}
