@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&family=Nunito+Sans:wght@300;400;500;600;700&family=Montserrat:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&family=Maven+Pro:wght@400;500;600;700&display=swap");

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Nunito Sans", "Inter", Arial, sans-serif;
  overflow-x: hidden;
}

.login-body {
  background-color: #111111;
}
.tickets-archived-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid #2a2a2a;
}

.tickets-archived-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 13px;
  cursor: pointer;
}

.tickets-archived-button img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.tickets-archived-count {
  color: #bdbdbd;
  font-size: 12px;
}

.tickets-archived-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid #2a2a2a;
  font-weight: 600;
  font-size: 13px;
}

.tickets-archived-back {
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tickets-archived-back img {
  width: 16px;
  height: 16px;
  transform: rotate(90deg);
  filter: brightness(0) invert(1);
}

.login-root {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background-color: #363636;
  padding: 32px;
  border-radius: 20px;
  text-align: center;
}

.login-logo {
  width: 80px;
  margin-bottom: 16px;
}

.login-title {
  color: #ffffff;
  margin: 0 0 16px;
  font-size: 16px;
}

.input-group {
  margin: 16px 0;
  position: relative;
}

.input-group input {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  border-radius: 5px;
  border: 2px solid #2ed46e;
  background-color: #222222;
  color: #ffffff;
  outline: none;
}

.input-group input::placeholder {
  color: #ffffff;
  opacity: 1;
}

.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus,
.input-group input:-webkit-autofill:active {
  -webkit-text-fill-color: #ffffff;
  box-shadow: 0 0 0 1000px #222222 inset;
  transition: background-color 5000s ease-in-out 0s;
}

.password-group input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}

.password-toggle svg {
  width: 22px;
  height: 22px;
  fill: #ffffff;
}

.icon-eye.is-hidden {
  display: none;
}

.login-button {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(90deg, #2ed46e, #2ed46e);
  color: #000000;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

.login-button.loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.loading-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000000;
  animation: spin 0.8s linear infinite;
}

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

.login-button:disabled {
  background: linear-gradient(90deg, #2ed46e, #2ed46e);
  cursor: not-allowed;
  opacity: 0.7;
}

.login-button:not(:disabled):hover {
  background: linear-gradient(90deg, #2ed46e, #2ed46e);
}

.reset-link {
  margin-top: 20px;
}

.reset-link a {
  color: #ffffff;
  text-decoration: none;
}

.otp-group {
  margin-top: 12px;
}

.otp-inputs {
  display: grid;
  grid-template-columns: repeat(6, minmax(36px, 1fr));
  gap: 8px;
}

.otp-input {
  height: 48px;
  border-radius: 8px;
  border: 2px solid #2ed46e;
  background-color: #222222;
  color: #ffffff;
  font-size: 18px;
  text-align: center;
  outline: none;
  font-weight: 600;
}

.otp-input:focus {
  box-shadow: 0 0 0 2px rgba(46, 212, 110, 0.2);
}

.login-slider {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #888888;
}

.slider-dot.active {
  background-color: #2ed46e;
}

.login-terms {
  margin-top: 16px;
  font-size: 12px;
  color: #aaaaaa;
  line-height: 1.4;
}

.login-terms a {
  color: #2ed46e;
  text-decoration: none;
  font-weight: bold;
}

.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.toast {
  --toast-duration: 4000ms;
  --toast-accent: #2ed46e;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  width: 360px;
  max-width: 90vw;
  border: 2px solid transparent;
  color: #ffffff;
  animation: toast-life var(--toast-duration) ease forwards;
}

.toast.success {
  background-color: #255c38;
  border-color: #2ed46e;
  color: #2ed46e;
  --toast-accent: #2ed46e;
}

.toast.info {
  background-color: #1b2a3a;
  border-color: #2f5a7a;
  color: #8fd3ff;
  --toast-accent: #8fd3ff;
}

.toast.error {
  background-color: #4b1717;
  border-color: #d60000;
  color: #fa4848;
  --toast-accent: #fa4848;
}

.toast-progress {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.toast-progress svg {
  width: 100%;
  height: 100%;
  display: block;
  transform: rotate(-90deg);
}

.toast-spinner-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 3;
}

.toast-spinner-bar {
  fill: none;
  stroke: var(--toast-accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
  animation: toast-progress var(--toast-duration) linear forwards;
}

.toast-message {
  flex: 1;
  line-height: 1.4;
}

@keyframes toast-progress {
  to {
    stroke-dashoffset: 100;
  }
}

@keyframes toast-life {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  12% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  85% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}

.inline-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  color: #cfcfcf;
  font-size: 13px;
  justify-content: center;
  min-height: 140px;
  flex: 1;
  align-self: stretch;
}

.inline-loading .loading-spinner {
  width: 56px;
  height: 56px;
  border-width: 3px;
  border-color: rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
}

.app-body {
  background-color: #333333;
  color: #ffffff;
}

.app-layout {
  display: flex;
  height: 100vh;
}

.app-body.app-embed .app-layout {
  height: 100vh !important;
  padding-top: 0 !important;
}

.app-body.app-embed .app-drawer {
  display: none;
}

.app-body.app-embed .mobile-topbar,
.app-body.app-embed .mobile-footer {
  display: none;
}

.app-body.app-embed .app-content {
  padding: 0;
}

.app-drawer {
  width: 104px;
  background-color: #212121;
  display: flex;
  flex-direction: column;
}

.drawer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  padding: 8px 0;
  margin-top: 0;
  background-color: #212121;
  gap: 8px;
}

.drawer-logo img {
  max-height: 30px;
  width: auto;
}

.drawer-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.drawer-menu::-webkit-scrollbar {
  display: none;
}

.drawer-item {
  width: 92%;
  margin: 2px auto;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  height: auto;
  justify-content: center;
}

.drawer-item img {
  width: 30px;
  height: 30px;
  filter: brightness(0) invert(1);
}

.drawer-item span {
  font-size: 11px;
  font-weight: 500;
  text-align: center;
}

.drawer-item:hover {
  background-color: #2e2e2e;
  border-color: #2e2e2e;
}

.drawer-item.active {
  background-color: #2e2e2e;
  border-color: #2e2e2e;
}

.drawer-logout {
  margin-top: 8px;
  color: #ff5252;
}

.drawer-logout span {
  color: #ff5252;
}

.drawer-logout:hover {
  background-color: #ff5252;
}

.drawer-logout:hover span {
  color: #ffffff;
}

.drawer-logout:hover img {
  filter: brightness(0) invert(1);
}

.app-content {
  flex: 1;
  background-color: #141414;
  overflow: auto;
  padding: 0;
}

.automation-flow-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 100%;
}

.automation-flow-iframe {
  border: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  flex: 1;
  display: block;
  background: #141414;
}

.app-content::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.app-content::-webkit-scrollbar-track {
  background: #2a2a2a;
}

.app-content::-webkit-scrollbar-thumb {
  background: #5a5a5a;
  border-radius: 8px;
}

.app-content::-webkit-scrollbar-thumb:hover {
  background: #6a6a6a;
}

.app-content {
  scrollbar-width: thin;
  scrollbar-color: #5a5a5a #2a2a2a;
}

.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  background-color: #151515;
  padding: 0 12px;
}

.mobile-topbar-avatar,
.mobile-topbar-action {
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-topbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  border: 1px solid #2a2a2a;
  background: #212121;
  overflow: hidden;
  position: relative;
}

.mobile-topbar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: block;
}

.mobile-topbar-avatar img.is-loaded {
  opacity: 1;
}

.mobile-topbar-avatar.is-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: spin-centered 0.8s linear infinite;
}

.mobile-topbar-avatar.is-loading img {
  opacity: 0.35;
  visibility: hidden;
}

.mobile-topbar-avatar img:not([src]),
.mobile-topbar-avatar img[src=""] {
  display: none;
}

.mobile-topbar-action {
  height: 36px;
  padding: 0 8px;
  gap: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}

.mobile-topbar-action span {
  line-height: 1;
}

.mobile-topbar-action img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.mobile-topbar-spacer {
  flex: 1;
}

.mobile-footer {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background-color: #212121;
  align-items: center;
  justify-content: space-around;
  z-index: 10;
}

.mobile-menu-item {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-menu-item img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

.mobile-menu-item:focus,
.mobile-menu-item:focus-visible {
  outline: none;
}

.mobile-menu-item.active {
  background-color: #2e2e2e;
  border-radius: 8px;
}

.app-placeholder {
  background-color: #2a2a2a;
  border-radius: 12px;
  padding: 24px;
}

@media (max-width: 600px) {
  .contact-drawer {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    border-left: none;
    z-index: 12 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
  }

  .contact-drawer.is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: calc(100vh - 104px) !important;
    margin-top: 48px !important;
    margin-bottom: 56px !important;
    z-index: 15 !important;
  }

  .contact-drawer-header {
    position: sticky;
    top: 0;
    background: #141414;
    z-index: 2;
  }

  .contact-drawer-close {
    position: relative;
    z-index: 3;
  }

  .app-layout {
    flex-direction: column;
    height: calc(100vh - 56px);
    padding-top: 48px;
  }

  .app-drawer {
    display: none;
  }

  .app-content {
    padding: 0;
    background-color: #151515;
  }

  .mobile-topbar {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
  }

  .mobile-footer {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
  }
}

.dash-wrap {
  padding: 0;
}

.dash-container {
  max-width: 1400px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.dash-container .topbar {
  margin-top: 12px;
}

.filters-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.filters-select {
  display: none;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.filters-range {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dash-title {
  color: #d3d3d3;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: auto;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
  align-items: stretch;
}

.stack-gap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-card {
  background: #111111;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 0 0 1px #1d1d1d inset;
  width: 100%;
  min-width: 0;
}

.dash-card-title {
  color: #9aa0a6;
  font-size: 13px;
  margin-bottom: 8px;
}

.dash-card-value {
  color: #2ed46e;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}

.donut-box {
  background: #111111;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 0 0 1px #1d1d1d inset;
  width: 100%;
  min-width: 0;
}

.donut-title {
  color: #9aa0a6;
  font-size: 13px;
  margin-bottom: 8px;
}

.donut-ctr {
  width: 100%;
  max-width: 520px;
  height: 320px;
  margin: 0;
  position: relative;
  min-width: 0;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #d3d3d3;
  font-size: 13px;
  align-items: center;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.donut-legend-item span {
  white-space: nowrap;
}

.donut-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dash-loading {
  margin-top: 10px;
  color: #9aa0a6;
}

.mini-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 36px;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mini-bar-label {
  color: #f1f1f1;
  opacity: 0.92;
  font-size: 12px;
  min-width: 0;
}

.mini-bar-track {
  background: #2b2b2b;
  height: 6px;
  border-radius: 6px;
  overflow: hidden;
}
.profile-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 80;
}
.profile-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 90;
}
.profile-modal-card {
  width: 100%;
  max-width: 520px;
  background: #101010;
  border: 1px solid #2b2b2b;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.profile-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.profile-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.profile-modal-subtitle {
  font-size: 13px;
  color: #b5b5b5;
  margin-top: 4px;
}
.profile-modal-close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.profile-modal .form-select {
  background: #202020;
  border-color: #333;
}
.profile-modal .btn-outline {
  background: #202020;
  border-color: #333;
}

.connections-modal .input-select {
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 8px 10px;
}

.connections-modal input[type="number"]::-webkit-outer-spin-button,
.connections-modal input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.connections-modal input[type="number"] {
  -moz-appearance: textfield;
}
.profile-modal-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.profile-avatar-button {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  border: 1px dashed #2a2a2a;
  background: #151515;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.profile-avatar-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.profile-avatar-button img.is-loaded,
.drawer-profile-avatar img.is-loaded {
  opacity: 1;
}

.profile-avatar-button.is-loading::after,
.drawer-profile-avatar.is-loading::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  top: 50%;
  left: 50%;
  animation: spin-centered 0.8s linear infinite;
}

.profile-avatar-button.is-loading img,
.drawer-profile-avatar.is-loading img {
  opacity: 0.35;
  visibility: hidden;
}

.profile-avatar-button img:not([src]),
.profile-avatar-button img[src=""],
.drawer-profile-avatar img:not([src]),
.drawer-profile-avatar img[src=""] {
  display: none;
}

.drawer-profile-avatar {
  width: 92%;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 14px;
  border: 1px solid #2a2a2a;
  background: #212121;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 auto;
  cursor: pointer;
  position: relative;
  padding: 0;
  box-sizing: border-box;
}

.drawer-profile-avatar img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-loading {
  position: relative;
  pointer-events: none;
  color: transparent !important;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #00c77a;
  animation: spin 0.8s linear infinite;
}

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

@keyframes spin-centered {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@media (max-width: 900px) {
  .drawer-profile-avatar {
    display: none;
  }
}
.profile-avatar-hint {
  font-size: 12px;
  color: #8a8a8a;
}
.profile-modal-form {
  display: grid;
  gap: 12px;
}
.profile-field label {
  display: block;
  font-size: 12px;
  color: #bdbdbd;
  margin-bottom: 6px;
}
.profile-phone-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
}
.profile-modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.profile-password-modal .profile-modal-card {
  max-width: 420px;
}
.profile-page {
  padding: 24px;
  display: flex;
  justify-content: center;
}
.profile-card {
  width: 100%;
  max-width: 720px;
  background: #101010;
  border: 1px solid #2b2b2b;
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.profile-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}
.profile-card-subtitle {
  font-size: 13px;
  color: #b5b5b5;
  margin-top: 4px;
}
.profile-card-body {
  display: grid;
  gap: 16px;
}
.profile-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.mini-bar-fill {
  height: 100%;
  transition: width 0.25s;
}

.mini-bar-value {
  color: #9aa0a6;
  font-size: 12px;
  text-align: right;
  min-width: 0;
}

.pill-button {
  width: 100%;
  background: #111111;
  color: #d3d3d3;
  border: 1px solid #2a2a2a;
  border-radius: 18px;
  padding: 6px 28px 6px 12px;
  text-align: left;
  cursor: pointer;
  line-height: 1.2;
  position: relative;
}

.pill-caret {
  position: absolute;
  right: 10px;
  top: 6px;
  pointer-events: none;
  color: #8a8a8a;
  font-size: 12px;
}

.pill-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  z-index: 20;
}

.pill-item {
  padding: 8px 10px;
  border-radius: 8px;
  color: #d3d3d3;
  cursor: pointer;
}

.pill-item:hover {
  background: #161616;
}

.filter-button {
  background: #111111;
  color: #d3d3d3;
  border-radius: 18px;
  border: 1px solid #2a2a2a;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}

.filter-button.active {
  background: #2ed46e;
  color: #000000;
}

.date-compact {
  background: #111111;
  color: #d3d3d3;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 6px 12px;
  outline: none;
}

@media (max-width: 900px) {
  .contact-drawer.is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin-top: 48px !important;
    margin-bottom: 56px !important;
    height: calc(100vh - 104px) !important;
    z-index: 15 !important;
  }

  .dash-wrap {
    padding: 0;
  }

  .topbar {
    justify-content: center;
    gap: 10px;
  }

  .dash-title {
    width: 100%;
    text-align: center;
    margin-left: 0;
    order: -1;
    margin-top: 4px;
  }

  .filters-pills {
    display: none;
  }

  .filters-select {
    display: flex;
  }

  .filters-range {
    justify-content: center;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .dash-card,
  .donut-box,
  .donut-ctr {
    width: 100%;
    max-width: 100%;
  }

  .mini-bar-row {
    grid-template-columns: 90px 1fr 32px;
  }

  .donut-ctr {
    height: 340px;
    padding-bottom: 30px;
    margin-top: 8px;
  }

  .donut-legend {
    position: absolute;
    left: 50%;
    right: auto;
    top: auto;
    bottom: -6px;
    transform: translateX(-50%);
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin-top: 0;
    gap: 6px;
    padding: 0 6px;
  }

  .donut-box {
    padding: 16px 12px;
  }

  .donut-legend-item span {
    font-size: 12px;
  }
}

.dash-wrap * {
  -webkit-tap-highlight-color: transparent;
}

.dash-wrap button,
.dash-wrap [role=\"button\"],
.dash-wrap select,
.dash-wrap input {
  outline: none;
  box-shadow: none;
}

.contacts-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.contacts-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 12px 16px;
}

.contacts-topbar .top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
}

.contacts-filter-group {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
}

.contacts-topbar .spacer {
  flex: 1 1 auto;
}

.contacts-topbar .top-title {
  flex: 0 0 auto;
  color: #d3d3d3;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: auto;
}

.contacts-content {
  flex: 1;
  overflow: auto;
  padding: 8px 16px 16px;
  position: relative;
}

.ticket-start-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket-start-section-title {
  font-size: 12px;
  color: #cfcfcf;
  margin-bottom: 6px;
}

.ticket-start-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ticket-start-option {
  width: 100%;
  text-align: center;
  padding: 10px 12px;
}

.ticket-start-actions .btn-outline {
  background: #2a2a2a;
}

.contacts-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.contacts-container.is-loading .contacts-topbar,
.contacts-container.is-loading .contacts-content {
  visibility: hidden;
}

.contacts-loading-overlay {
  position: absolute;
  inset: 0;
}

.contacts-loading-overlay.page-loading {
  background: transparent;
}

.contact-card {
  background: #101010;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #1d1d1d;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-between;
}

.contact-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-avatar-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
}

.contact-drawer {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  width: 360px !important;
  max-width: 90vw !important;
  height: 100% !important;
  background: #141414 !important;
  border-left: 1px solid #2b2b2b;
  z-index: 70 !important;
  display: none !important;
  flex-direction: column !important;
  box-shadow: none !important;
  margin: 0 !important;
}

.contact-drawer-overlay {
  display: none !important;
}

.contact-drawer.is-open {
  display: flex !important;
}

@media (min-width: 961px) {
  .contact-drawer.is-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border-left: none !important;
    right: 0 !important;
    left: 0 !important;
  }
}

.contact-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: none;
}

.contact-drawer-close {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1f1f1f;
  border: 1px solid #2b2b2b;
  border-radius: 6px;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.contact-drawer-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.contact-drawer-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.contact-drawer-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: visible;
  flex: 0 0 auto;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 2px solid transparent;
  box-sizing: border-box;
}

.contact-drawer-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.contact-drawer-avatar.is-placeholder .contact-drawer-avatar-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: invert(1);
}

.contact-drawer-avatar.ring-wa {
  border-color: #2ed46e;
}

.contact-drawer-avatar.ring-ig {
  border-color: #ff2d75;
}

.contact-drawer-title-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.contact-drawer-name {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-drawer-sub {
  color: #bdbdbd;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-drawer-actions {
  margin-top: 0;
  opacity: 0;
  transform: translateY(6px);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, max-height 0.2s ease, margin-top 0.2s ease;
}

.contact-drawer-actions.is-visible {
  margin-top: 14px;
  opacity: 1;
  transform: translateY(0);
  max-height: 80px;
  pointer-events: auto;
}

.contact-drawer-actions .btn-primary {
  width: 100%;
}

.contact-drawer-actions .btn-primary:disabled {
  background: #3a3a3a;
  border-color: #3a3a3a;
  color: #bdbdbd;
  cursor: not-allowed;
  opacity: 1;
}


.contact-drawer-section .text-input {
  width: 100%;
  background: #1d1d1d;
  color: #fff;
  border: 1px solid #2b2b2b;
  border-radius: 12px;
  padding: 10px 12px;
  resize: none;
  min-height: 86px;
  font-family: inherit;
}

.contact-drawer-section .contact-number-inline .text-input,
.contact-drawer-section .contact-number-inline .form-input,
.contact-drawer-section .contact-number-inline select.text-input,
.contact-drawer-section .contact-number-inline .contact-country {
  height: 38px;
  padding: 8px 10px;
  line-height: 1.2;
  box-sizing: border-box;
  min-height: 0;
}

.contact-drawer-section .contact-number-inline select.text-input,
.contact-drawer-section .contact-number-inline .contact-country {
  background: #111111;
  border: 1px solid #2b2b2b;
  color: #ffffff;
  color-scheme: dark;
}

.contact-drawer-section input[type="date"] {
  font-family: inherit;
}

.contact-drawer-section input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

.contact-note-list {
  margin-top: 16px;
}

.contact-notes-title {
  display: block;
  font-size: 12px;
  color: #9f9f9f;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.contact-note-item {
  align-items: stretch;
  background: #1b1b1b;
  border: 1px solid #2b2b2b;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-note-item + .contact-note-item {
  margin-top: 12px;
}

.contact-note-item:last-child {
  margin-bottom: 12px;
}

.contact-note-meta {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  color: #cfcfcf;
  font-size: 11px;
  margin: 0;
  line-height: 1.2;
}

.contact-note-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.contact-note-meta-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.contact-note-author {
  font-weight: 600;
}

.contact-note-time {
  opacity: 0.8;
}

.contact-note-text {
  font-size: 13px;
  color: #fff;
  margin: 0;
  white-space: pre-wrap;
  font-weight: 600;
  line-height: 1.35;
}

.contact-note-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #3a1d1d;
  background: #2a1414;
  cursor: pointer;
  align-self: flex-start;
  margin: 0;
}

.contact-note-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin: 0;
}

.contact-note-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #1d2a3a;
  background: #141d2a;
  cursor: pointer;
  align-self: flex-start;
  margin: 0;
}

.contact-note-edit img {
  width: 14px;
  height: 14px;
  display: block;
  filter: invert(100%);
}

.contact-note-edit-input {
  margin-top: 6px;
}

.contact-note-edit-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}

.contact-note-delete img {
  width: 14px;
  height: 14px;
  display: block;
  filter: invert(25%) sepia(82%) saturate(2706%) hue-rotate(351deg) brightness(97%) contrast(101%);
}


.tickets-page {
  position: relative;
}

.tickets-page.contact-drawer-open .tickets-chat {
  padding-right: 360px;
}

.contact-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.contact-avatar.placeholder .icon-svg {
  width: 26px;
  height: 26px;
  display: block;
  filter: invert(1);
}

.contact-avatar.ring-wa {
  border-color: #2ed46e;
}

.contact-avatar.ring-ig {
  border-color: #ff2d75;
}

.contact-badge {
  position: absolute;
  bottom: -2px;
  left: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 2px solid #101010;
}

.contact-badge .icon-svg {
  width: 12px;
  height: 12px;
  display: block;
  filter: invert(1);
}

.contact-badge.wa {
  background: #2ed46e;
  border-color: #2ed46e;
}

.contact-badge.ig {
  background: #ff2d75;
  border-color: #ff2d75;
}

.contact-title-col {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-name {
  font-weight: 700;
  color: #fff;
  font-size: 16px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-sub {
  color: #d3d3d3;
  opacity: 0.85;
  font-size: 13px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.icon-btn {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #ffffff;
}

.icon-btn:focus,
.icon-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.icon-btn .icon-svg {
  width: 18px;
  height: 18px;
  display: block;
  filter: invert(1);
}

.icon-btn.danger .icon-svg {
  filter: invert(34%) sepia(90%) saturate(6335%) hue-rotate(352deg) brightness(100%) contrast(101%);
}

.contacts-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.contacts-loading .loading-spinner {
  width: 42px;
  height: 42px;
  border-width: 3px;
  border-color: rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
}

.quickmsg-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.quickmsg-container [hidden] {
  display: none !important;
}

.quickmsg-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 12px 16px;
}

.quickmsg-topbar .top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
}

.quickmsg-topbar .spacer {
  flex: 1 1 auto;
}

.quickmsg-topbar .top-title {
  flex: 0 0 auto;
  color: #d3d3d3;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: auto;
}

.quickmsg-container {
  position: relative;
}

.quickmsg-container.is-loading .quickmsg-topbar,
.quickmsg-container.is-loading .quickmsg-content {
  visibility: hidden;
}

.quickmsg-loading-overlay {
  position: absolute;
  inset: 0;
}

.quickmsg-loading-overlay.page-loading {
  background: transparent;
}

.quickmsg-content {
  flex: 1;
  overflow: auto;
  padding: 8px 16px 16px;
}

.quickmsg-table-wrap {
  background: transparent;
  border-radius: 12px;
  border: none;
  padding: 0;
}

.quickmsg-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.quickmsg-table thead tr {
  background: #00ff5b;
  height: 50px;
}

.quickmsg-table th {
  color: #000000;
  font-weight: 700;
  padding: 12px;
  text-transform: none;
}

.quickmsg-table tbody tr {
  background: #262626;
}

.quickmsg-table td {
  color: #ffffff;
  padding: 12px;
}

.quickmsg-table th:first-child,
.quickmsg-table td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.quickmsg-table th:last-child,
.quickmsg-table td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.quickmsg-col-center {
  text-align: center;
}

.quickmsg-col-left {
  text-align: left;
}

.quickmsg-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quickmsg-loading,
.quickmsg-empty {
  margin-top: 8px;
  color: #9aa0a6;
  text-align: center;
}

.quickmsg-modal {
  width: min(420px, 90vw);
}

.quickmsg-modal .modal-footer {
  display: flex;
}

.quickmsg-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quickmsg-textarea {
  min-height: 140px;
  resize: vertical;
}

.text-input.is-contenteditable {
  min-height: 40px;
  display: flex;
  align-items: center;
  cursor: text;
}

.text-input.is-contenteditable:empty::before {
  content: attr(data-placeholder);
  color: #8a8a8a;
}

.quickmsg-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quickmsg-picker-list {
  max-height: 320px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 6px;
}

.quickmsg-modal .quickmsg-picker-list::-webkit-scrollbar {
  width: 6px;
}

.quickmsg-modal .quickmsg-picker-list::-webkit-scrollbar-track {
  background: transparent;
}

.quickmsg-modal .quickmsg-picker-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.quickmsg-list {
  max-height: unset;
}

.quickmsg-admin-item {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.quickmsg-admin-item.is-dragging {
  opacity: 0.5;
}

.quickmsg-admin-item.is-drag-over {
  border-color: #2ed46e;
  box-shadow: 0 0 0 1px rgba(46, 212, 110, 0.25);
}

.quickmsg-admin-item.is-drag-over::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -2px;
  height: 3px;
  border-radius: 999px;
  background: #2ed46e;
  box-shadow: 0 0 10px rgba(46, 212, 110, 0.6);
}

.quickmsg-drag-placeholder {
  height: 0;
  border: 2px dashed rgba(46, 212, 110, 0.6);
  border-radius: 10px;
  background: rgba(46, 212, 110, 0.08);
  margin: 2px 0;
}

.quickmsg-admin-handle {
  color: #6f6f6f;
  font-size: 16px;
  line-height: 1;
  cursor: grab;
  user-select: none;
}

.quickmsg-admin-content {
  flex: 1;
  min-width: 0;
}

.quickmsg-admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quickmsg-admin-actions .icon-btn {
  background: transparent;
  border: 1px solid #2a2a2a;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.quickmsg-admin-actions .icon-btn:hover {
  border-color: #2ed46e;
}

.quickmsg-picker-item {
  border: 1px solid #2a2a2a;
  background: #242424;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  color: #fff;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease;
}

.quickmsg-picker-item:hover {
  border-color: #2ed46e;
  background: #1f1f1f;
}

.quickmsg-picker-item.is-selected {
  border-color: #2ed46e;
  box-shadow: 0 0 0 2px rgba(46, 212, 110, 0.2);
  background: rgba(46, 212, 110, 0.12);
}

.quickmsg-picker-code {
  font-size: 14px;
  color: #b9f2d0;
  font-weight: 700;
}

.quickmsg-picker-message {
  font-size: 13px;
  color: #d8d8d8;
  margin-top: 4px;
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.users-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.users-container [hidden] {
  display: none !important;
}

.users-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 12px 16px;
}

.users-topbar .top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
}

.users-topbar .spacer {
  flex: 1 1 auto;
}

.users-topbar .top-title {
  flex: 0 0 auto;
  color: #d3d3d3;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: auto;
}

.users-content {
  flex: 1;
  overflow: auto;
  padding: 8px 16px 16px;
}

.users-table-wrap {
  background: transparent;
}

.queues-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.queues-container [hidden] {
  display: none !important;
}

.queues-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 12px 16px;
}

.queues-topbar .top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
}

.queues-topbar .spacer {
  flex: 1 1 auto;
}

.queues-topbar .top-title {
  flex: 0 0 auto;
  color: #d3d3d3;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: auto;
}

.queues-content {
  flex: 1;
  overflow: auto;
  padding: 8px 16px 16px;
}

.tags-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.tags-container [hidden] {
  display: none !important;
}

.tags-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 12px 16px;
}

.tags-topbar .top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
}

.tags-topbar .spacer {
  flex: 1 1 auto;
}

.tags-topbar .top-title {
  flex: 0 0 auto;
  color: #d3d3d3;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: auto;
}

.tags-topbar .btn-square {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #2ed46e;
  border: none;
}

.tags-topbar .btn-square img {
  width: 16px;
  height: 16px;
  filter: brightness(0) saturate(100%);
}

.tags-topbar .input-dark img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.tags-content {
  flex: 1;
  overflow: auto;
  padding: 8px 16px 16px;
}

.tags-container.is-loading .tags-topbar,
.tags-container.is-loading .tags-content {
  visibility: hidden;
}

.tags-loading-overlay {
  position: absolute;
  inset: 0;
}

.tags-loading-overlay.page-loading {
  background: transparent;
}

.tags-color-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tags-color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-block;
}

.tags-modal {
  width: min(520px, 94vw);
}

.tags-modal .form-grid.tag-grid {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: end;
  column-gap: 12px;
}

.tags-modal .form-field {
  width: 100%;
}

.tags-modal .text-input {
  height: 44px;
}

.tags-modal .color-square {
  width: 44px;
  height: 44px;
}

.schedules-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.schedules-container [hidden] {
  display: none !important;
}

.schedules-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 12px 16px;
}

.schedules-topbar .top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
}

.schedules-topbar .spacer {
  flex: 1 1 auto;
}

.schedules-topbar .top-title {
  flex: 0 0 auto;
  color: #d3d3d3;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: auto;
}

.schedules-topbar .btn-square {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #2ed46e;
  border: none;
}

.schedules-topbar .btn-square.is-secondary {
  background: #2a2a2a;
}

.schedules-topbar .btn-square img {
  width: 16px;
  height: 16px;
  filter: brightness(0) saturate(100%);
}

.schedules-topbar .btn-square.is-secondary img {
  filter: brightness(0) invert(1);
}

.schedules-topbar .input-dark img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.schedules-content {
  flex: 1;
  overflow: auto;
  padding: 8px 16px 16px;
}

.schedules-report {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  padding: 0 16px 8px;
}

.schedules-report .report-card {
  background: #1b1b1b;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid #2a2a2a;
}

.schedules-report .report-label {
  color: #b0b0b0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.schedules-report .report-value {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin-top: 4px;
}

.schedules-report .report-chart {
  background: #1b1b1b;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-column: span 2;
}

.schedules-report .report-bar {
  display: grid;
  grid-template-columns: 90px 1fr 36px;
  align-items: center;
  gap: 10px;
  color: #dcdcdc;
  font-size: 12px;
}

.schedules-report .report-bar::before {
  content: attr(data-label);
}

.schedules-report .bar-fill {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2ed46e, #3bff87);
  display: block;
  width: 0;
}

.schedules-report .bar-fill[data-kind="sent"] {
  background: linear-gradient(90deg, #2da7ff, #64c4ff);
}

.schedules-report .bar-fill[data-kind="error"] {
  background: linear-gradient(90deg, #ff6b6b, #ff9a9a);
}

.schedules-report .bar-value {
  text-align: right;
  color: #f3f3f3;
  font-weight: 600;
}

.schedules-container.is-loading .schedules-topbar,
.schedules-container.is-loading .schedules-content {
  visibility: hidden;
}

.schedules-loading-overlay {
  position: absolute;
  inset: 0;
}

.schedules-loading-overlay.page-loading {
  background: transparent;
}

.schedules-modal .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.schedules-modal .modal-search {
  border-radius: 10px;
}

.schedules-modal .contact-search-wrap {
  position: relative;
}

.schedules-modal .modal-search img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.schedules-modal .modal-search input {
  background: transparent;
  border: none;
  color: #f1f1f1;
  width: 100%;
}

.schedules-modal .modal-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 12px;
  width: 12px;
  border-radius: 50%;
  background: url("/assets/icons/close.svg") no-repeat center / 12px 12px;
  filter: brightness(0) invert(1);
}

.schedules-modal input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  opacity: 0 !important;
}

.schedules-modal input[type="datetime-local"] {
  color-scheme: dark;
}

.schedules-modal input[type="datetime-local"]::-webkit-datetime-edit {
  color: #f1f1f1;
}

.schedule-datetime {
  padding-right: 36px;
}

.schedules-modal .contact-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid #2a2a2a;
  background: #1b1b1b;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  z-index: 5;
}

.schedules-modal .contact-results:empty {
  display: none;
}

.schedules-modal .contact-result {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #f1f1f1;
  text-align: left;
}

.schedules-modal .contact-result:hover {
  background: #242424;
}

.schedules-modal .contact-name {
  font-size: 13px;
}

.schedules-modal .contact-number {
  font-size: 12px;
  color: #9aa0a6;
}

.schedules-modal .contact-empty {
  padding: 10px 12px;
  color: #9aa0a6;
  font-size: 12px;
}

.schedules-modal textarea.text-input {
  resize: none;
  min-height: 96px;
}

.schedules-modal .modal-body {
  max-height: unset;
  overflow: visible;
  position: relative;
}

.schedules-modal .modal-loading {
  position: absolute;
  inset: 0;
  background: #1c1c1c;
  z-index: 2;
}

.schedules-modal.is-loading .modal-body > :not(.modal-loading) {
  visibility: hidden;
}

.schedules-modal .form-row label {
  font-size: 12px;
  color: #bdbdbd;
}

.schedules-modal .form-hint {
  font-size: 12px;
  color: #f2c94c;
}

.connections-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.connections-container.is-loading .connections-topbar,
.connections-container.is-loading .connections-content {
  visibility: hidden;
}

.connections-loading-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
}

.connections-loading-overlay.page-loading {
  background: transparent;
}

.connections-container [hidden] {
  display: none !important;
}

.connections-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 12px 16px;
}

.connections-topbar .top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
}

.connections-topbar .spacer {
  flex: 1 1 auto;
}

.settings-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 12px;
  position: relative;
}

.settings-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 12px 16px;
  margin-top: 12px;
}

.settings-topbar .top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-topbar .spacer {
  flex: 1 1 auto;
}

.settings-topbar .top-title {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  color: #dcdcdc;
}

.settings-tab {
  background: #262626;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #2a2a2a;
}

.settings-tab.is-active {
  background: #2ed46e;
  color: #000000;
}

.settings-tab img {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
}

.settings-tab.is-active img {
  filter: brightness(0);
}

.settings-panels {
  flex: 1;
  padding: 0 16px 16px;
}

.settings-panel {
  display: none;
}

.settings-panel.is-active {
  display: block;
}

.settings-section {
  background: #1f1f1f;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #2a2a2a;
}

.automation-credentials-section {
  background: transparent;
  border: none;
  padding: 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.automation-credentials-section .section-header {
  align-items: center;
}

.automation-credentials-section .section-title {
  line-height: 1;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.section-subtitle {
  font-size: 12px;
  color: #a0a0a0;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-actions .btn-square {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #2ed46e;
  border: none;
}

.section-actions .btn-square img {
  width: 16px;
  height: 16px;
  filter: brightness(0) saturate(100%);
}

.section-actions .input-dark img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.settings-table-wrap {
  background: #1b1b1b;
  border-radius: 10px;
  padding: 8px;
  overflow-x: auto;
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
  color: #f5f5f5;
}

.settings-table th,
.settings-table td {
  text-align: left;
  padding: 10px;
  font-size: 13px;
  border-bottom: 1px solid #2a2a2a;
}

.settings-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.settings-date-icon {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1) !important;
}

.settings-loading-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
}

.settings-container.is-loading .settings-topbar,
.settings-container.is-loading .settings-panels {
  visibility: hidden;
}

.company-users-modal {
  width: min(1100px, 96vw);
}

.settings-modal .form-grid.two-cols {
  grid-template-columns: 1fr 80px;
  align-items: end;
  column-gap: 12px;
}

.settings-modal .form-grid.company-grid {
  grid-template-columns: 1fr 1fr;
}

.settings-modal .form-grid.user-grid {
  grid-template-columns: 1fr 1fr;
}

.settings-modal .form-field.full-width {
  grid-column: 1 / 2;
}

.color-square {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.color-square::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-square::-webkit-color-swatch {
  border: none;
  border-radius: 10px;
}

.settings-modal input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

.settings-modal input[type="color"],
.settings-confirm-modal input[type="color"],
.company-users-modal input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 10px;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.company-users-modal {
  width: min(980px, 94vw);
}

.settings-modal input[type="color"],
.settings-confirm-modal input[type="color"],
.company-users-modal input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  width: 46px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.settings-modal input[type="color"]::-webkit-color-swatch-wrapper,
.settings-confirm-modal input[type="color"]::-webkit-color-swatch-wrapper,
.company-users-modal input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.settings-modal input[type="color"]::-webkit-color-swatch,
.settings-confirm-modal input[type="color"]::-webkit-color-swatch,
.company-users-modal input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 10px;
}

.settings-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.settings-actions .icon-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.settings-actions .icon-btn img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.settings-loading,
.settings-empty {
  text-align: center;
  margin: 12px 0 6px;
  color: #b0b0b0;
}

.settings-loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

.credentials-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.credentials-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.credentials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.credential-card {
  position: relative;
  background: #1f1f1f;
  border: 1px solid #2d2d2d;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
}

.credential-card .credential-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #2a2a2a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.credential-card .credential-icon img {
  width: 20px;
  height: 20px;
}

.credential-card .credential-title {
  font-weight: 700;
  color: #f4f4f4;
}

.credential-card .credential-subtitle {
  font-size: 12px;
  color: #a8a8a8;
}

.credential-card .credential-actions {
  margin-top: auto;
  display: flex;
  gap: 6px;
}

.credential-card .credential-actions .icon-btn img {
  filter: brightness(0) invert(1);
}

.credentials-row {
  display: flex;
  gap: 12px;
}

#automation-credentials-modal .form-field + .form-field {
  margin-top: 10px;
}

#automation-credentials-modal .automation-credentials-field {
  margin-top: 12px;
}

#automation-credentials-modal .automation-credentials-field .credentials-row {
  margin-top: 8px;
}

.automation-credentials-smtp-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

#automation-credentials-modal input:-webkit-autofill,
#automation-credentials-modal input:-webkit-autofill:hover,
#automation-credentials-modal input:-webkit-autofill:focus,
#automation-credentials-modal input:-webkit-autofill:active {
  -webkit-text-fill-color: #fff;
  box-shadow: 0 0 0 1000px #202020 inset;
  transition: background-color 9999s ease-in-out 0s;
  border: 1px solid #333;
}

#automation-credentials-modal .text-input:invalid,
#automation-credentials-modal .text-input:invalid:focus {
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.automation-credentials-grid {
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 22px;
}

.automation-credentials-grid .card {
  background: #1b1b1b;
  border-radius: 14px;
  border: 2px solid #2f2f2f;
  height: 245px;
  padding: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.automation-credentials-grid .card.criar {
  background: #00c77a;
  color: #003b18;
  font-weight: 700;
  opacity: 1;
  transform: translateY(0);
}

.automation-credentials-grid .criar-titulo {
  font-size: 16px;
  font-weight: 700;
  color: #003b18;
}

.automation-credentials-grid .card.enter {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.automation-credentials-grid .card.enter:hover {
  transform: translateY(-6px);
}

.automation-credentials-grid .icon img {
  height: 42px;
  margin-bottom: 14px;
  filter: invert(56%) sepia(77%) saturate(362%) hue-rotate(96deg) brightness(96%) contrast(92%);
}

.automation-credentials-grid .titulo {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  display: inline-block;
  padding: 2px 6px;
}

.automation-credentials-grid .subtitulo {
  text-align: center;
  color: #aaa;
  font-size: 13px;
  margin-top: 8px;
}

.automation-credentials-grid .menu-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  color: #aaa;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.automation-credentials-grid .menu-btn:hover {
  background: #2a2a2a;
  border-color: #555;
  color: #fff;
}

.automation-credentials-grid .menu {
  display: none;
  position: absolute;
  top: 34px;
  right: 10px;
  background: #1e1e1e;
  border-radius: 10px;
  padding: 6px;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.automation-credentials-grid .menu.show {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.automation-credentials-grid .menu.exit {
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
}

.automation-credentials-grid .menu button {
  width: 100%;
  background: transparent;
  border: none;
  color: #ccc;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s, margin-left 0.15s;
}

.automation-credentials-grid .menu button:hover {
  background: #2a2a2a;
  margin-left: 4px;
  color: #fff;
}

.automation-credentials-grid .menu button.excluir {
  color: #ff6b6b;
}

.automation-credentials-grid .menu button.excluir:hover {
  background: #e53935;
  color: #fff;
}

.credentials-row .form-field {
  flex: 1;
}

.settings-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.settings-checkboxes input,
.settings-queues-list input {
  accent-color: #2ed46e;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dcdcdc;
  font-size: 13px;
}

.settings-queues {
  margin-top: 12px;
}

.settings-queues-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.settings-color {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #3a3a3a;
}

.settings-panel input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  width: 42px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.settings-panel input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.settings-panel input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}

.connections-topbar .top-title {
  flex: 0 0 auto;
  color: #d3d3d3;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: auto;
}

.connections-content {
  flex: 1;
  overflow: auto;
  padding: 8px 16px 16px;
}

.connections-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.connection-card {
  background: #101010;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #1d1d1d;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.connection-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  flex: 1 1 auto;
}

.connection-avatar-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
}

.connection-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1c1c1c;
  border: 2px solid transparent;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.connection-avatar .icon-svg {
  width: 26px;
  height: 26px;
  display: block;
  filter: invert(1);
}

.connection-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.connection-avatar.ring-wa {
  border-color: #2ed46e;
}

.connection-avatar.ring-ig {
  border-color: #ff2d75;
}

.connection-badge {
  position: absolute;
  bottom: -2px;
  left: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 2px solid #101010;
}

.connection-badge .icon-svg {
  width: 12px;
  height: 12px;
  display: block;
  filter: invert(1);
}

.connection-badge.wa {
  background: #2ed46e;
  border-color: #2ed46e;
}

.connection-badge.ig {
  background: #ff2d75;
  border-color: #ff2d75;
}

.connection-title-col {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.connection-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.connection-name {
  font-weight: 700;
  color: #fff;
  font-size: 16px;
  line-height: 1.15;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.connection-sub {
  color: #d3d3d3;
  opacity: 0.85;
  font-size: 13px;
  line-height: 1.15;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.connection-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.connection-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin-top: auto;
}

.automation-config-btn {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
}

.automation-config-btn img {
  filter: brightness(0) invert(1);
}

.automation-config-btn:hover {
  border-color: #3a3a3a;
  background: #1f1f1f;
  box-shadow: none;
}

.automation-config-btn:focus,
.automation-config-btn:focus-visible {
  outline: none;
  box-shadow: none;
  border-color: #3a3a3a;
  background: #1f1f1f;
}

#automation-modal .connections-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.connection-automation {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #1d1d1d;
  padding-top: 10px;
  margin-top: 2px;
}

.automation-label {
  font-size: 13px;
  color: #d3d3d3;
  font-weight: 600;
}

.automation-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.automation-select {
  background: #1c1c1c;
  border: 1px solid #2a2a2a;
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
}

.automation-select:disabled {
  opacity: 0.6;
}

.automation-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.automation-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.automation-toggle-indicator {
  width: 40px;
  height: 22px;
  background: #333;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease;
}

.automation-toggle-indicator::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  left: 2px;
  top: 2px;
  transition: transform 0.2s ease;
}

.automation-toggle input:checked + .automation-toggle-indicator {
  background: #2ed46e;
}

.automation-toggle input:checked + .automation-toggle-indicator::after {
  transform: translateX(18px);
}

.automation-toggle input:disabled + .automation-toggle-indicator {
  background: #2a2a2a;
  opacity: 0.6;
  cursor: not-allowed;
}

.connections-loading,
.connections-empty {
  margin-top: 8px;
  color: #9aa0a6;
}

.connections-modal {
  width: min(420px, 90vw);
}

.connections-modal .modal-footer {
  flex-direction: row;
}

.connections-modal .btn-primary {
  width: auto;
}

.connections-modal .btn-outline {
  width: auto;
}

.automation-workspace {
  padding: 8px 0 24px;
}

.automation-headerbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px 0;
}

.automation-header-title {
  font-size: 20px;
  font-weight: 700;
  color: #d3d3d3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.automation-workspace .tabs {
  display: flex;
  gap: 8px;
  padding: 0;
}

.automation-workspace .tab-button {
  background: #111;
  border: 1px solid #242424;
  color: #aaa;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.15s ease;
}

.automation-workspace .tab-button:hover {
  border-color: #444;
  color: #fff;
}

.automation-workspace .tab-button.active {
  background: #00c77a;
  border-color: #00c77a;
  color: #003b18;
}

.automation-workspace .tab-content {
  display: none;
}

.automation-workspace .tab-content.active {
  display: block;
}

.automation-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 24px 0;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.automation-summary-item {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 0;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.automation-summary-item.is-active {
  background: #0b2b1c;
  border-color: #1f5f3f;
}

.automation-summary-item.is-draft {
  background: #2b0b0b;
  border-color: #5f1f1f;
}

.automation-summary-item .summary-label {
  font-size: 12px;
  color: #a0a0a0;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.automation-summary-item .summary-value {
  font-size: 18px;
  font-weight: 700;
  color: #e6e6e6;
}


.automation-workspace .grid {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 22px;
}

.automation-workspace #fluxosGrid {
  max-width: 1200px;
  margin: 0 auto;
}

.automation-workspace #dadosGrid,
.automation-workspace #credenciaisGrid {
  max-width: 1200px;
  margin: 0 auto;
}

.automation-workspace .card {
  background: #1b1b1b;
  border-radius: 14px;
  border: 2px solid #2f2f2f;
  height: 245px;
  padding: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.automation-workspace .card.criar {
  background: #00c77a;
  color: #003b18;
  font-weight: 700;
  opacity: 1;
  transform: translateY(0);
}

.automation-workspace .icon img {
  height: 42px;
  margin-bottom: 14px;
}

.automation-workspace .card .icon img,
.automation-workspace .card-form .icon img {
  filter: invert(56%) sepia(77%) saturate(362%) hue-rotate(96deg) brightness(96%) contrast(92%);
}

.automation-workspace .titulo {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  display: inline-block;
  padding: 2px 6px;
  cursor: text;
}

.automation-workspace .badge-status {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: #2a2a2a;
  color: #aaa;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.automation-workspace .badge-status.live {
  background: #00c77a;
  color: #003b18;
}

.automation-workspace .menu-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  color: #aaa;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.automation-workspace .menu-btn:hover {
  background: #2a2a2a;
  border-color: #555;
  color: #fff;
}

.automation-workspace .menu {
  display: none;
  position: absolute;
  top: 34px;
  right: 10px;
  background: #1e1e1e;
  border-radius: 10px;
  padding: 6px;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.automation-workspace .menu.show {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.automation-workspace .menu.exit {
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
}

.automation-workspace .menu button {
  width: 100%;
  background: transparent;
  border: none;
  color: #ccc;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s, margin-left 0.15s;
}

.automation-workspace .menu button:hover {
  background: #2a2a2a;
  margin-left: 4px;
  color: #fff;
}

.automation-workspace .menu button.excluir {
  color: #ff6b6b;
}

.automation-workspace .menu button.excluir:hover {
  background: #e53935;
  color: #fff;
}

.automation-workspace .card-form {
  background: #1b1b1b;
  border-radius: 14px;
  border: 1px solid #2f2f2f;
  padding: 18px;
  height: 245px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.automation-workspace .btn-cancelar {
  width: 100%;
  background: #2a2a2a;
  border: none;
  color: #aaa;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}

.automation-workspace .btn-cancelar:hover {
  background: #333;
  color: #fff;
}

.automation-workspace .btn-confirmar {
  width: 100%;
  background: #00c77a;
  border: none;
  color: #003b18;
  padding: 10px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.automation-workspace .btn-confirmar:hover {
  opacity: 0.9;
}

.automation-workspace .btn-danger {
  width: 100%;
  background: #e53935;
  border: none;
  color: #fff;
  padding: 10px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.automation-workspace .btn-danger:hover {
  background: #d32f2f;
}

.automation-workspace .card:hover {
  transform: translateY(-3px);
}

.automation-workspace .criar-titulo {
  font-size: 16px;
  font-weight: 700;
  color: #003b18;
}

.automation-workspace .card.enter {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.automation-workspace .card.enter:hover {
  transform: translateY(-6px);
}

.automation-workspace .card.exit {
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.automation-workspace .modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: stretch;
  justify-content: stretch;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.25s ease;
  margin: 0;
  padding: 24px;
  box-sizing: border-box;
  transform: none;
  border: none;
  border-radius: 0;
  max-height: none;
}

.automation-workspace .modal.show {
  display: flex;
  opacity: 1;
}

.automation-workspace .modal-box {
  position: fixed;
  top: 50%;
  left: 50%;
  background: #1b1b1b;
  border-radius: 14px;
  padding: 16px;
  width: 360px;
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.automation-workspace .modal-box-large {
  width: min(720px, 92vw);
}

.automation-workspace .modal.show .modal-box {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.automation-workspace .modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.automation-workspace .form-input,
.automation-workspace select.form-input {
  background: #242424;
  border: 1px solid #2f2f2f;
  border-radius: 8px;
  color: #fff;
}

.automation-flow-shell {
  width: 100%;
  height: calc(100vh - 70px);
}

.automation-flow-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.automation-json {
  width: 100%;
  background: #1c1c1c;
  color: #fff;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 12px;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 13px;
  min-height: 320px;
}

.connections-type-modal {
  width: min(360px, 90vw);
}

.connections-type-modal .modal-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.connections-type-modal .btn-solid {
  width: 100%;
  justify-content: flex-start;
  background: #3f3f3f;
  border-color: #4a4a4a;
  color: #ffffff;
}

.connections-type-modal .btn-solid .icon-svg {
  filter: invert(1);
}

.instagram-modal {
  width: min(560px, 92vw);
}

.copy-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 12px;
}

.copy-field .form-input {
  margin: 0;
}

.copy-action {
  height: 40px;
  padding: 0 16px;
  white-space: nowrap;
}

.instagram-modal .copy-field .btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #2a2a2a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qr-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #1c1c1c;
  border-radius: 12px;
  border: 1px solid #2a2a2a;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  z-index: 60;
}

.qr-modal[hidden] {
  display: none;
}

.connections-qr-modal {
  width: min(710px, 92vw);
}

.connections-qr-modal .modal-body {
  padding: 18px 20px 22px;
}

.qr-layout {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(300px, 0.8fr);
  gap: 28px;
  color: #e6e6e6;
  align-items: start;
}

.qr-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: center;
  padding-left: 10px;
}

.qr-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.qr-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 12px;
  align-items: center;
  margin: 0;
}

.qr-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #5a5a5a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #dcdcdc;
  margin-top: 2px;
}

.qr-step-text {
  font-size: 14px;
  color: #d8d8d8;
  line-height: 1.35;
  text-align: left;
}

.qr-keep {
  margin-top: 10px;
  font-size: 13px;
  color: #9ad8a8;
}

.qr-code-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  justify-self: end;
}

.qr-box {
  width: 260px;
  height: 260px;
  border-radius: 12px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.connection-qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid #cfcfcf;
  border-top-color: #2ed46e;
  animation: spin 0.9s linear infinite;
}

.qr-wait {
  text-align: center;
  font-size: 12px;
  color: #bdbdbd;
  max-width: 280px;
}

.qr-alt {
  font-size: 12px;
  color: #93d7a2;
  text-decoration: underline;
  cursor: pointer;
}

.qr-paircode {
  font-size: 12px;
  color: #1a1a1a;
  background: #f0f0f0;
  padding: 6px 8px;
  border-radius: 6px;
  margin-top: 8px;
}

@media (max-width: 760px) {
  .qr-layout {
    grid-template-columns: 1fr;
  }
  .qr-box {
    width: 220px;
    height: 220px;
  }
}

.connections-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.connection-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid transparent;
}

.connection-status.status-online {
  background: #1f3f2b;
  color: #2ed46e;
  border-color: #2ed46e;
}

.connection-status.status-offline {
  background: #3a1f1f;
  color: #ff6b6b;
  border-color: #ff6b6b;
}

.connection-status.status-qr {
  background: #1f2f3f;
  color: #4cc3ff;
  border-color: #4cc3ff;
}

.connection-status.status-idle {
  background: #2a2a2a;
  color: #d3d3d3;
  border-color: #2a2a2a;
}

.qr-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.connection-qr-image {
  width: 240px;
  max-width: 100%;
  display: block;
  margin: 0 auto 12px;
  background: #ffffff;
  padding: 10px;
  border-radius: 12px;
}

.connection-qr-hint,
.connection-qr-empty,
.connection-qr-text {
  text-align: center;
  color: #d3d3d3;
  font-size: 14px;
}

.connection-qr-text {
  word-break: break-all;
}

.queues-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.queues-table thead tr {
  background: #00ff5b;
  height: 50px;
}

.queues-table th {
  color: #000000;
  font-weight: 700;
  padding: 12px;
  text-transform: none;
}

.queues-table tbody tr {
  background: #262626;
}

.queues-table td {
  color: #ffffff;
  padding: 12px;
}

.queues-table th:first-child,
.queues-table td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.queues-table th:last-child,
.queues-table td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.queues-col-center {
  text-align: center;
}

.queues-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.queues-color-cell {
  display: flex;
  justify-content: center;
  align-items: center;
}

.queues-color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-block;
}

.queues-loading,
.queues-empty {
  margin-top: 8px;
  color: #9aa0a6;
  text-align: center;
}

.queues-modal {
  width: min(300px, 92vw);
}

.queues-modal .modal-footer {
  flex-direction: column;
}

.queues-modal .modal-footer .btn-outline,
.queues-modal .modal-footer .btn-primary {
  width: 100%;
  height: auto;
  padding: 10px 12px;
}

.queues-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.queues-modal .form-input {
  height: 38px;
}

.queues-form .form-row {
  grid-template-columns: 1fr 38px;
  gap: 10px;
}

.queues-color-field {
  display: flex;
  flex-direction: column;
}

.color-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  min-height: 38px;
  justify-content: center;
}

.color-preview {
  width: 38px;
  height: 38px;
  border-radius: 4px;
  border: 1px solid #2a2a2a;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.color-input {
  flex: 1;
}

.color-picker {
  width: 38px;
  height: 38px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.color-input-wrap .color-picker {
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  position: absolute;
}

.users-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.users-table thead tr {
  background: #00ff5b;
  height: 50px;
}

.users-table th {
  color: #000000;
  font-weight: 700;
  padding: 12px;
  text-transform: none;
}

.users-table tbody tr {
  background: #262626;
}

.users-table td {
  color: #ffffff;
  padding: 12px;
}

.users-table th:first-child,
.users-table td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.users-table th:last-child,
.users-table td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.users-col-center {
  text-align: center;
}

.users-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.users-loading,
.users-empty {
  margin-top: 8px;
  color: #9aa0a6;
  text-align: center;
}

.users-modal {
  width: min(520px, 92vw);
}

.users-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.users-queues {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.multi-select {
  position: relative;
}

.multi-select-trigger {
  width: 100%;
  min-height: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  color: #ffffff;
}

.multi-select-placeholder {
  color: #8a8a8a;
  font-size: 13px;
}

.multi-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 10px 24px rgba(0,0,0,.45);
  z-index: 30;
  max-height: 200px;
  overflow: auto;
}

.multi-select-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  color: #d3d3d3;
  cursor: pointer;
}

.multi-select-item:hover {
  background: #161616;
}

.multi-select-item input {
  pointer-events: none;
}

.queue-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: #ffffff;
  background: #2a2a2a;
}

.btn-square {
  background: #2ed46e;
  color: #000000;
  height: 38px;
  min-height: 38px;
  width: 38px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-square .icon-svg {
  width: 18px;
  height: 18px;
  display: block;
}

.btn-solid {
  background: #2ed46e;
  color: #000000;
  border-radius: 10px;
  border: 1px solid #2ed46e;
  height: 38px;
  min-height: 38px;
  padding: 0 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-solid .icon-svg {
  width: 16px;
  height: 16px;
  display: block;
}

.btn-muted {
  background: #2a2a2a;
  color: #9aa0a6;
  border-radius: 10px;
  border: 1px solid #3a3a3a;
  height: 38px;
  min-height: 38px;
  padding: 0 12px;
  cursor: pointer;
}

.contacts-container [hidden] {
  display: none !important;
}

.input-dark {
  height: 38px;
  min-height: 38px;
  display: flex;
  align-items: center;
  border-radius: 10px;
  background: #111111;
  border: 1px solid #2a2a2a;
  color: #ffffff;
  padding: 0 12px;
  gap: 6px;
}

.input-dark svg {
  width: 16px;
  height: 16px;
  fill: #ffffff;
  flex: 0 0 auto;
}

.input-dark .icon-svg {
  width: 16px;
  height: 16px;
  display: block;
  filter: invert(1);
  flex: 0 0 auto;
}

.input-dark input {
  background: transparent;
  border: none;
  color: #ffffff;
  width: 100%;
  height: 100%;
  padding: 0;
  line-height: 38px;
  outline: none;
}

.pill-select {
  height: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  background: #111111;
  color: #d3d3d3;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 0 12px;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.contacts-topbar .input-dark,
.contacts-topbar .pill-select,
.mobile-controls .input-dark,
.mobile-controls .pill-select {
  height: 38px;
  min-height: 38px;
  align-self: center;
}

.pill-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 10px 24px rgba(0,0,0,.45);
  z-index: 30;
}

.pill-item {
  padding: 8px 10px;
  border-radius: 8px;
  color: #d3d3d3;
  cursor: pointer;
}

.pill-item:hover {
  background: #161616;
}

.mobile-controls {
  padding: 8px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 50;
}

.modal-overlay.is-top {
  z-index: 70;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #1c1c1c;
  border-radius: 12px;
  border: 1px solid #2a2a2a;
  width: min(500px, 90vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  z-index: 60;
}

.modal.is-top {
  z-index: 80;
}

.modal[hidden],
.modal-overlay[hidden] {
  display: none;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #2a2a2a;
}

.modal-title {
  color: #ffffff;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  margin-left: auto;
}

.modal-header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.modal-header-action.modal-header-action-left {
  margin-left: 8px;
  margin-right: auto;
}

.modal-save-action {
  height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 11px;
  margin-right: 6px;
  flex: 0 0 auto;
  width: fit-content;
  min-width: 56px;
  max-width: 80px;
}

.modal-header-action .btn-primary.modal-save-action {
  flex: 0 0 auto !important;
  width: fit-content !important;
  min-width: 56px !important;
  max-width: 80px !important;
}

.modal-header .modal-header-action + .modal-close {
  margin-left: 8px !important;
}

.form-unsaved-confirm {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.form-unsaved-card {
  background: #1c1c1c;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 16px;
  width: min(360px, 90%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #fff;
}

.form-unsaved-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.form-shortcode-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #1f1f1f;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 10px;
}

.form-shortcode-text {
  font-size: 12px;
  color: #cfcfcf;
  word-break: break-all;
}

.modal-header .btn-icon.modal-add-action {
  background: #00e676 !important;
  border-radius: 8px;
  padding: 6px;
}

.modal-add-action img {
  filter: none !important;
  opacity: 1;
}

.modal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.modal-body {
  padding: 16px;
  overflow: auto;
  color: #ffffff;
}

#pipeline-modal {
  overflow: visible;
}

#pipeline-modal .modal-body {
  overflow: visible;
}

#pipeline-modal.pipeline-contact-modal .modal-body {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
  flex: 1;
  min-height: 0;
}

.modal-footer {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #2a2a2a;
}

.modal-footer .btn-primary.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-footer .btn-primary.is-loading .btn-loading-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.modal-footer .btn-primary.is-loading .loading-spinner {
  width: 14px;
  height: 14px;
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
}

.filters-modal-window .modal-body {
  overflow: visible;
}

.filters-modal-window .modal-footer {
  justify-content: flex-end;
}

.filters-modal-window .btn-primary {
  flex: 1;
}

.filters-modal {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.filters-field {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filters-field + .filters-field .filters-label {
  margin-top: 10px;
}

.filters-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #d7d7d7;
}

.filters-hint {
  font-size: 12px;
  color: #9aa0a6;
}

.filters-multi-select .multi-select-trigger {
  background: #2a2a2a;
  border: 1px solid #353535;
  border-radius: 12px;
  padding: 8px 14px;
  color: #e6e6e6;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.filters-multi-select .multi-select-trigger.is-empty {
  color: #a0a0a0;
}

.filters-multi-select .multi-select-caret {
  margin-left: auto;
  color: #ffffff;
  font-size: 12px;
}

.filters-multi-select .multi-select-menu {
  background: #1f1f1f;
  border-radius: 12px;
}

.filters-multi-select .multi-select-item {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 8px 10px;
}

.filters-multi-select .filters-option-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e6e6e6;
}

.filters-multi-select .filters-option-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  filter: brightness(0) invert(1);
}

.filters-multi-select .multi-select-item.is-selected {
  background: #262626;
}

.filters-multi-select .multi-select-item:hover {
  background: #262626;
}

.filters-multi-select .multi-select-item input[type="checkbox"] {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: none;
  background: #4a4a4a;
  display: inline-block;
}

.filters-multi-select .multi-select-item input[type="checkbox"]:checked {
  background: #2ed46e;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9'><path fill='black' d='M4.4 8.1L.6 4.3l1.4-1.4 2.4 2.4 5.2-5.2L11 1.5z'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 8px;
}

.filters-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #2a2a2a;
  border: 1px solid transparent;
  color: #e6e6e6;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
}

.filters-option input {
  margin: 0;
  accent-color: #2ed46e;
}

.filters-option input:checked + span {
  color: #ffffff;
}

.filters-empty {
  font-size: 12px;
  color: #8a8a8a;
  padding: 6px 2px;
}

.btn-outline {
  flex: 1;
  background: transparent;
  color: #ffffff;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  height: 38px;
  cursor: pointer;
}

.btn-outline.btn-danger {
  background: #e53935;
  border-color: #e53935;
  color: #ffffff;
  white-space: nowrap;
}

.btn-primary {
  flex: 1;
  background: #2ed46e;
  color: #000000;
  border: none;
  border-radius: 8px;
  height: 38px;
  cursor: pointer;
}

.btn-primary.btn-danger {
  background: #e53935;
  color: #ffffff;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.form-row.single {
  grid-template-columns: 1fr;
}

.form-label {
  display: block;
  font-size: 12px;
  color: #d3d3d3;
  margin-bottom: 4px;
}

.form-hint {
  font-size: 12px;
  color: #9aa0a6;
  margin-top: 6px;
}

.form-input,
.form-select {
  width: 100%;
  background: #111111;
  border: 1px solid #2a2a2a;
  color: #ffffff;
  border-radius: 8px;
  padding: 8px 10px;
  outline: none;
}

.variable-row {
  background: #212121;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.variable-row.is-dragging {
  opacity: 0.6;
}

.variable-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.variable-row-text {
  font-weight: 600;
  color: #fff;
}

.variable-type-icon img {
  width: 18px;
  height: 18px;
  display: block;
  filter: brightness(0) invert(1);
}

.variable-drag-handle {
  cursor: grab;
  padding: 4px;
}

.variable-drag-handle img {
  width: 14px;
  height: 14px;
  opacity: 0.7;
  filter: brightness(0) invert(1);
}

.variable-actions {
  display: flex;
  gap: 6px;
}

.variable-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.variable-options-label {
  margin-top: 12px;
}

.variable-options-add {
  margin-top: 10px;
  margin-bottom: 12px;
  background: #00e676;
  color: #0e0e0e;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.variable-options-add img {
  width: 16px;
  height: 16px;
  filter: none;
}

.variable-option-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

.variable-required {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: #cfcfcf;
}

.variable-required-checkbox {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: none;
  background: #3a3a3a;
  display: inline-block;
}

.variable-required-checkbox:checked {
  background: #2ed46e;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9'><path fill='black' d='M4.4 8.1L.6 4.3l1.4-1.4 2.4 2.4 5.2-5.2L11 1.5z'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 10px;
}

.variable-actions button {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
}

@media (max-width: 900px) {
  .contacts-topbar {
    padding-bottom: 0;
  }

  .contacts-topbar .top-title {
    width: 100%;
    text-align: center;
    margin: 0 auto;
  }

  .contacts-topbar .top-left {
    display: none;
  }

  .contacts-content {
    padding: 8px 12px 16px;
  }

  .quickmsg-topbar {
    padding-bottom: 0;
  }

  .quickmsg-topbar .top-title {
    width: 100%;
    text-align: center;
    margin: 0 auto;
  }

  .quickmsg-topbar .top-left {
    display: none;
  }

  .quickmsg-content {
    padding: 8px 12px 16px;
  }

  .users-topbar {
    padding-bottom: 0;
  }

  .users-topbar .top-title {
    width: 100%;
    text-align: center;
    margin: 0 auto;
  }

  .users-topbar .top-left {
    display: none;
  }

  .users-content {
    padding: 8px 12px 16px;
  }

  .queues-topbar {
    padding-bottom: 0;
  }

  .queues-topbar .top-title {
    width: 100%;
    text-align: center;
    margin: 0 auto;
  }

  .queues-topbar .top-left {
    display: none;
  }

  .queues-content {
    padding: 8px 12px 16px;
  }

  .connections-topbar {
    padding-bottom: 0;
  }

  .connections-topbar .top-title {
    width: 100%;
    text-align: center;
    margin: 0 auto;
  }

  .connections-topbar .top-left {
    display: none;
  }

  .connections-content {
    padding: 8px 12px 16px;
  }
}

@media (max-width: 600px) {
  .contacts-container .contacts-list {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .copy-field {
    grid-template-columns: 1fr;
  }

  .copy-action {
    width: 100%;
  }

  .quickmsg-table thead tr {
    height: 45px;
  }

  .quickmsg-table th,
  .quickmsg-table td {
    padding: 10px;
  }

  .users-table thead tr {
    height: 45px;
  }

  .users-table th,
  .users-table td {
    padding: 10px;
  }

  .queues-table thead tr {
    height: 45px;
  }

  .queues-table th,
  .queues-table td {
    padding: 10px;
  }

  .connections-list {
    grid-template-columns: 1fr;
  }
}

.tickets-page {
  display: grid;
  grid-template-columns: 460px 1fr;
  height: 100%;
  gap: 0;
  padding: 0;
  color: #ffffff;
}
.campaigns-container {
  position: relative;
}

.campaigns-container.is-loading .campaigns-topbar,
.campaigns-container.is-loading .campaigns-content {
  visibility: hidden;
}

.campaigns-loading-overlay {
  position: absolute;
  inset: 0;
}

.campaigns-loading-overlay.page-loading {
  background: transparent;
}

.page-loading {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-loading .loading-spinner,
.modal-loading .loading-spinner,
.campaigns-loading .loading-spinner {
  width: 42px;
  height: 42px;
  border-width: 3px;
  border-color: rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
}

.page-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #d9d9d9;
  font-size: 14px;
}

.modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 140px;
  color: #cfcfcf;
  font-size: 14px;
}

.tickets-sidebar {
  background: #161616;
  border-radius: 0;
  padding: 16px 16px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  border-right: 1px solid #222;
}

.tickets-page--embed .tickets-sidebar {
  display: none;
}

.tickets-page--embed .tickets-chat {
  flex: 1 1 auto;
  border-radius: 0;
}

.tickets-page--embed .ticket-back-btn {
  display: none !important;
}

@media (max-width: 960px) {
  .tickets-page--embed .messages-list {
    padding-bottom: 96px;
  }

  .tickets-page--embed .send-message-form {
    bottom: 12px;
  }
}

.tickets-sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tickets-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tickets-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tickets-header-icon {
  border: none;
  background: transparent;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tickets-header-icon img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.tickets-header-icon .ticket-actions-dots {
  font-size: 18px;
  line-height: 1;
  color: #ffffff;
}

.tickets-title {
  font-weight: 700;
  font-size: 16px;
}

.tickets-refresh {
  border: none;
  background: transparent;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tickets-refresh img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.tickets-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #262626;
  border-radius: 999px;
  padding: 8px 12px;
  position: relative;
}

.tickets-search img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.tickets-search .tickets-search-input {
  background: transparent;
  border: none;
  color: #ffffff;
  width: 100%;
  outline: none;
  min-height: 20px;
  cursor: text;
}

.tickets-search-field-btn {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tickets-search-field-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.tickets-search-field-btn img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.tickets-search-field-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 8px;
  min-width: 220px;
  max-width: 280px;
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: #1f1f1f;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
  z-index: 20;
}

.tickets-search-clear {
  background: transparent;
  border: none;
  color: #bdbdbd;
  font-size: 18px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tickets-search-clear:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.tickets-search-field-item {
  background: transparent;
  border: none;
  color: #ffffff;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tickets-search-field-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.tickets-search-field-item span {
  display: block;
}

.tickets-search-field-item .field-key {
  font-size: 11px;
  color: #9e9e9e;
}

.tickets-search-field-empty {
  color: #8d8d8d;
  font-size: 12px;
  padding: 8px 10px;
}

.tickets-search .tickets-search-input:empty::before {
  content: attr(data-placeholder);
  color: #8a8a8a;
}

.tickets-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow: hidden;
  white-space: nowrap;
}

.tickets-tab {
  border: none;
  background: #262626;
  color: #ffffff;
  border-radius: 18px;
  padding: 6px 10px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.tickets-tab.is-active {
  background: #09533b;
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: #1f1f1f;
  font-size: 9px;
  font-weight: 700;
}

.tickets-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tickets-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.tickets-empty {
  color: #8d8d8d;
  font-size: 13px;
  text-align: center;
  padding: 24px 0;
}

.ticket-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ticket-item.is-active {
  background: #2f2f2f;
}

.ticket-item:hover {
  background: #2f2f2f;
}

.ticket-avatar-wrapper {
  position: relative;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #25d366;
}

.ticket-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.ticket-avatar.avatar-fallback {
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.ticket-avatar-wrapper.avatar-fallback {
  background: #2a2a2a;
  padding: 8px;
}

.ticket-contact-avatar.avatar-fallback {
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.ticket-channel {
  position: absolute;
  bottom: -2px;
  left: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #25d366;
  padding: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.ticket-channel-icon {
  width: 10px;
  height: 10px;
  filter: brightness(0) invert(1);
}

.ticket-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.tickets-loading-inline {
  width: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.tickets-loading-inline .loading-spinner {
  width: 42px;
  height: 42px;
  border-width: 3px;
  border-color: rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
}

.ticket-info-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ticket-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-time {
  font-size: 11px;
  color: #9e9e9e;
  flex: none;
}

.ticket-info-middle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticket-subline {
  font-size: 11px;
  color: #8d8d8d;
}

.ticket-connection {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #bdbdbd;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 999px;
}

.ticket-connection--whatsapp {
  color: #25d366;
  background: rgba(37, 211, 102, 0.12);
}

.ticket-connection--instagram,
.ticket-connection--instagramwebhook {
  color: #E1306C;
  background: rgba(225, 48, 108, 0.12);
}

.ticket-connection--site {
  color: #008081;
  background: rgba(0, 128, 129, 0.16);
}

.ticket-preview {
  font-size: 12px;
  color: #bdbdbd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.ticket-unread {
  background: #0f7a4f;
  color: #ffffff;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

.ticket-side {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: #bdbdbd;
  font-size: 12px;
  white-space: nowrap;
}

.ticket-side-user {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #bdbdbd;
}

.ticket-side-user img {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  object-fit: cover;
}

.ticket-side-user img.is-icon {
  filter: brightness(0) invert(1);
}

.ticket-side-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ticket-side-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6d6d6d;
}

.ticket-info-bottom {
  display: none;
}

.tickets-chat {
  background: #0f0f0f;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ticket-chat-header {
  padding: 10px 18px;
  background: #161616;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #1f1f1f;
}

.ticket-contact {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ticket-back-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.ticket-back-btn img {
  width: 16px;
  height: 16px;
  transform: rotate(90deg);
  filter: brightness(0) invert(1);
}

.ticket-contact.is-clickable {
  cursor: pointer;
}

.ticket-contact.is-clickable:hover .ticket-contact-name {
  color: inherit;
}


.ticket-contact-avatar-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #25d366;
}

.ticket-contact-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.ticket-contact-avatar-wrapper.avatar-fallback {
  background: #2a2a2a;
  padding: 8px;
}

.ticket-contact-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ticket-contact-name {
  font-weight: 600;
}

.ticket-contact-meta {
  font-size: 12px;
  color: #9e9e9e;
}

.ticket-bot-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  margin-right: 6px;
}

.ticket-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #1f1f1f;
  border: 1px solid #2a2a2a;
  cursor: pointer;
  padding: 0;
  margin-right: 6px;
}

.ticket-search-trigger img {
  width: 18px;
  height: 18px;
  filter: brightness(0) saturate(100%) invert(78%) sepia(0%) saturate(0%) hue-rotate(219deg) brightness(92%) contrast(85%);
}

.ticket-search-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
}

.tickets-search-content-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 0;
}

.tickets-search-content-toggle.is-active {
  background: transparent;
  border-color: transparent;
}

.tickets-search-content-toggle img {
  width: 18px;
  height: 18px;
  filter: brightness(0) saturate(100%) invert(31%) sepia(96%) saturate(3112%) hue-rotate(341deg) brightness(103%) contrast(96%);
}

.tickets-search-content-toggle.is-active img {
  filter: brightness(0) saturate(100%) invert(56%) sepia(77%) saturate(402%) hue-rotate(88deg) brightness(96%) contrast(90%);
}

.tickets-search-content-toggle:hover {
  background: transparent;
}

.ticket-bot-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #1f1f1f;
  border: 1px solid #2a2a2a;
  cursor: pointer;
  padding: 0;
}

.ticket-bot-status.is-active {
  background: #0b2b1c;
  border-color: #1f5f3f;
}

.ticket-bot-status.is-paused {
  background: #2f2205;
  border-color: #7a5200;
}

.ticket-bot-status.is-disabled {
  background: #2b0b0b;
  border-color: #5f1f1f;
}

.ticket-bot-status img {
  width: 18px;
  height: 18px;
  filter: brightness(0) saturate(100%) invert(78%) sepia(0%) saturate(0%) hue-rotate(219deg) brightness(92%) contrast(85%);
}

.ticket-bot-status.is-active img {
  filter: brightness(0) saturate(100%) invert(56%) sepia(77%) saturate(402%) hue-rotate(88deg) brightness(96%) contrast(90%);
}

.ticket-bot-status.is-paused img {
  filter: brightness(0) saturate(100%) invert(64%) sepia(74%) saturate(933%) hue-rotate(3deg) brightness(96%) contrast(95%);
}

.ticket-bot-status.is-disabled img {
  filter: brightness(0) saturate(100%) invert(30%) sepia(91%) saturate(2386%) hue-rotate(343deg) brightness(102%) contrast(97%);
}

.ticket-bot-status:hover {
  background: rgba(255, 255, 255, 0.08);
}

.ticket-header-actions {
  display: flex;
  gap: 6px;
  position: relative;
}

.ticket-actions-trigger {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}

.ticket-actions-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
}

.ticket-actions-dots {
  font-size: 18px;
  line-height: 1;
}

.ticket-actions-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #202020;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  min-width: 200px;
  padding: 6px 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  z-index: 20;
}

.ticket-action-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: #f2f2f2;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
}

.ticket-action-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.ticket-action-item img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.ticket-action-item.is-danger {
  color: #ff6b6b;
}

.ticket-action-item.is-danger img {
  filter: brightness(0) saturate(100%) invert(27%) sepia(83%) saturate(3552%) hue-rotate(350deg) brightness(97%) contrast(96%);
}

.ticket-action {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ticket-action img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.ticket-tags {
  padding: 6px 18px 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ticket-tag {
  background: #262626;
  color: #ffffff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
}

.ticket-tag-group {
  background: #3b2b64;
}

.input-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: #2a2a2a;
  color: #ffffff;
}

.tags-modal-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tags-modal-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 13px;
}

.tags-modal-item span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #262626;
}

.messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-y;
}

.message-date-separator,
.message-date-floating {
  align-self: center;
  background: #2a2a2a;
  color: #cfcfcf;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.2px;
}

.message-date-floating {
  position: sticky;
  top: 8px;
  z-index: 2;
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.message-date-floating.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.messages-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.message-bubble {
  max-width: 70%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
  position: relative;
  word-break: break-word;
  overflow-wrap: anywhere;
  touch-action: pan-y;
}

.message-bubble.is-highlight {
  box-shadow: 0 0 0 2px rgba(46, 212, 110, 0.5);
}

.message-bubble.is-selected {
  box-shadow: none;
  user-select: none;
  -webkit-user-select: none;
  z-index: 1;
}

.messages-list .message-bubble.is-selected {
  background: inherit !important;
}

.messages-list .message-bubble.is-selected::before {
  content: "";
  position: absolute;
  left: -200vw;
  right: -200vw;
  width: auto;
  top: -6px;
  bottom: -6px;
  background: #3a3a3a;
  border-radius: 12px;
  z-index: 0;
}

.messages-list .message-bubble.is-selected > * {
  position: relative;
  z-index: 1;
}

.message-react-trigger {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #2f2f2f;
  background: #1e1e1e;
  color: #fff;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: auto;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.message-menu-trigger {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: none;
  cursor: pointer;
  z-index: 2;
}

.message-menu-trigger img {
  width: 14px;
  height: 14px;
  filter: invert(1);
}

.message-reply-trigger {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #2f2f2f;
  background: #1e1e1e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: auto;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.message-forward-trigger {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #2f2f2f;
  background: #1e1e1e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: auto;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.message-forward-trigger img {
  width: 14px;
  height: 14px;
  filter: invert(1);
}

.message-reply-trigger img {
  width: 16px;
  height: 16px;
  filter: invert(1);
}


.message-bubble.from-me .message-react-trigger {
  left: -36px;
}

.message-bubble.from-them .message-react-trigger {
  right: -36px;
}

.message-bubble.from-me .message-reply-trigger {
  left: -72px;
}

.message-bubble.from-them .message-reply-trigger {
  right: -72px;
}

.message-bubble.from-me .message-forward-trigger {
  left: -72px;
}

.message-bubble.from-them .message-forward-trigger {
  right: -72px;
}

.message-bubble:hover .message-react-trigger,
.message-react-trigger:hover,
.message-bubble.has-reaction-open .message-react-trigger {
  opacity: 1;
  transform: translateY(-50%) scale(1.02);
}

.message-bubble:hover .message-menu-trigger,
.message-menu-trigger:hover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-2px) scale(1.02);
}

.message-bubble:hover .message-reply-trigger,
.message-reply-trigger:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.02);
}

.message-bubble:hover .message-forward-trigger,
.message-forward-trigger:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.02);
}

@media (hover: none) {
  .message-react-trigger {
    display: none;
  }
  .message-reply-trigger {
    display: none;
  }
  .message-forward-trigger {
    display: none;
  }
  .message-menu-trigger {
    display: none;
  }
}

@media (pointer: coarse) {
  .message-menu-trigger {
    display: none;
  }
  .message-forward-trigger {
    display: none;
  }
}

.message-action-menu {
  position: absolute;
  background: #242626;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  z-index: 80;
  display: none;
}

.message-action-menu.is-open {
  display: block;
}

.message-action-menu.from-me {
  background: #144d37;
  border-color: #0f2e22;
  box-shadow: 0 12px 24px rgba(20, 77, 55, 0.45);
}

.message-action-menu.from-them {
  background: #242626;
  border-color: #2a2a2a;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

.company-delete-progress {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.company-delete-label {
  font-size: 15px;
  color: #eaeaea;
}

.company-delete-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.company-delete-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ff5a5a, #ff8a5a);
  transition: width 0.2s ease;
}

.company-delete-percent {
  font-size: 13px;
  color: #bcbcbc;
  text-align: right;
}

.finance-loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  z-index: 9999;
}

.finance-page.is-loading > :not(.finance-loading) {
  visibility: hidden;
}

.finance-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 28px;
  background: #1c1c1c;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.finance-loading-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(46, 212, 110, 0.2);
  border-top-color: #2ed46e;
  animation: spin 0.8s linear infinite;
}

.finance-loading-text {
  font-size: 14px;
  font-weight: 600;
  color: #dfe9e3;
}

.finance-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  color: #f5f5f5;
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
}

.finance-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.finance-hero-content {
  background: linear-gradient(135deg, #2b1315, #150b0c);
  border-radius: 20px;
  padding: 22px 22px 22px;
  border: 1px solid #3a1c1f;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.finance-badge {
  display: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(46, 212, 110, 0.2);
  color: #2ed46e;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.finance-hero-content h1 {
  margin: 0px 0 8px;
  font-size: 28px;
  font-weight: 700;
}

.finance-hero-content p {
  margin: 0;
  color: #cbd5cf;
  font-size: 14px;
}

.finance-hero-card {
  background: #151a17;
  border-radius: 20px;
  padding: 0px 20px 20px;
  border: 1px solid #232a26;
  display: grid;
  gap: 12px;
  align-content: center;
}

.finance-hero-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8ea89a;
}

.finance-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.finance-hero-row strong {
  color: #ffffff;
}

.finance-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.finance-tab {
  flex: 1 1 0;
  border: 1px solid #25302a;
  background: #151a17;
  color: #cbd5cf;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.finance-tab.is-active {
  background: #2ed46e;
  color: #0b120f;
  border-color: #2ed46e;
}

.finance-panel {
  display: none;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.finance-panel.is-active {
  display: grid;
}

.finance-panel-info {
  background: #111614;
  border-radius: 18px;
  padding: 24px;
  border: 1px solid #212a25;
}

.finance-panel-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.finance-panel-info p {
  margin: 0;
  color: #98a8a0;
  font-size: 14px;
}

.finance-form {
  background: #151a17;
  border-radius: 18px;
  padding: 24px;
  border: 1px solid #212a25;
  display: grid;
  gap: 16px;
}

.finance-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 8, 7, 0.75);
  z-index: 10001;
}

.finance-modal-card {
  width: min(620px, 92vw);
  background: #141916;
  border: 1px solid #243129;
  border-radius: 20px;
  padding: 32px 36px;
  text-align: center;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.55);
}

.finance-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.finance-modal-actions button {
  flex: 1 1 220px;
  min-width: 220px;
}

.finance-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: #111614;
  border: 1px solid #212a25;
}

.finance-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #dfe9e3;
  cursor: pointer;
}

.finance-toggle input {
  appearance: none;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #2b2f2c;
  border: 1px solid #353c38;
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.finance-toggle input::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #cbd5cf;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.finance-toggle input:checked {
  background: rgba(46, 212, 110, 0.35);
  border-color: #2ed46e;
}

.finance-toggle input:checked::after {
  transform: translateX(18px);
  background: #2ed46e;
}

.finance-field {
  display: grid;
  gap: 8px;
}

.finance-field label {
  font-size: 13px;
  color: #8ea89a;
}

.finance-field input,
.finance-form textarea {
  background: #0e1311;
  border: 1px solid #27322c;
  border-radius: 12px;
  padding: 12px 14px;
  color: #ffffff;
  font-size: 14px;
  outline: none;
}

.finance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.finance-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(46, 212, 110, 0.1);
  border: 1px dashed rgba(46, 212, 110, 0.35);
  border-radius: 12px;
  color: #bfead1;
  font-weight: 600;
}

.finance-primary {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  background: #2ed46e;
  color: #0b120f;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.finance-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.finance-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(46, 212, 110, 0.2);
}

.finance-danger {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  background: #ef4444;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.finance-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.25);
}

.finance-helper {
  font-size: 13px;
  color: #9ca3af;
  min-height: 18px;
}

.finance-helper[data-status="success"] {
  color: #2ed46e;
}

.finance-helper[data-status="error"] {
  color: #f87171;
}

.finance-qr {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.finance-qr img {
  width: 240px;
  height: 240px;
  border-radius: 16px;
  background: #ffffff;
  padding: 8px;
}

.finance-copy {
  border: 1px solid #2ed46e;
  background: transparent;
  color: #2ed46e;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}

.finance-form textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
}

@media (max-width: 900px) {
  .finance-hero {
    gap: 16px;
  }

  .finance-hero-content,
  .finance-hero-card {
    min-height: auto;
  }

  .finance-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .finance-hero-content {
    padding: 18px;
  }

  .finance-hero-card {
    padding: 16px;
  }
}

@media (max-width: 560px) {
  .finance-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .finance-field input,
  .finance-form textarea {
    min-width: 0;
  }
}

.notify-toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  pointer-events: none;
}

.notify-toast {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #1b1b1b;
  border: 1px solid #2b2b2b;
  color: #f2f2f2;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  max-width: min(340px, 86vw);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: auto;
  cursor: pointer;
}

.notify-toast.is-visible {
  opacity: 1;
}

.notify-avatar-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: #121212;
  border: 2px solid #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.notify-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notify-avatar.avatar-fallback {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

.notify-avatar-wrap.avatar-fallback {
  background: #202020;
}

.notify-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.notify-name {
  font-size: 14px;
  font-weight: 700;
  color: #f5f5f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.notify-preview {
  font-size: 12px;
  color: #cfcfcf;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.notify-instance {
  font-size: 11px;
  color: #8bdca8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-align: left;
}

.notify-toast-container.is-pipeline {
  right: auto;
  left: calc(104px + 16px);
}

@media (max-width: 720px) {
  .notify-toast-container.is-pipeline {
    left: 0;
    right: 0;
  }
}

@media (max-width: 720px) {
  .notify-toast-container {
    right: 0;
    left: 0;
    bottom: 14px;
    justify-content: center;
  }
}

.form-row.single .general-save-btn {
  width: auto !important;
  min-width: 160px;
  max-width: 220px;
  padding: 10px 20px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.general-save-btn .loading-spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
  border-top-color: #0b0b0b;
  display: none;
}

.general-save-btn.is-loading .loading-spinner {
  display: inline-block;
}

.general-save-btn.is-loading .btn-label {
  opacity: 0.8;
}

#general-priority-time {
  width: auto;
  min-width: 160px;
  max-width: 220px;
}

#general-priority-time::-webkit-outer-spin-button,
#general-priority-time::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#general-priority-time {
  -moz-appearance: textfield;
}

.pill-select-caret {
  color: #8a8a8a;
  font-size: 12px;
}

.user-queues-select {
  position: relative;
  width: 100%;
}

.user-queues-select .pill-select {
  width: 100%;
}

.user-queues-menu {
  max-height: 260px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
  z-index: 1200;
}

.user-queues-option {
  padding: 6px 8px;
  border-radius: 8px;
}

.user-queues-option:hover {
  background: #161616;
}

.modal.forward-modal {
  max-width: 520px;
}

.forward-modal-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.forward-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forward-selected {
  color: #9aa0a6;
  font-size: 12px;
}

.forward-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #1c1c1c;
  border: 1px solid #2b2b2b;
  border-radius: 10px;
}

.forward-search img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

.forward-search input {
  flex: 1;
  background: transparent;
  border: none;
  color: #e8e8e8;
  font-size: 14px;
  outline: none;
}

.forward-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow: auto;
  scrollbar-width: none;
}

.forward-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.forward-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #1b1b1b;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.forward-item:hover {
  border-color: #2b2b2b;
}

.forward-item input {
  margin: 2px 0 0;
}

.forward-check {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #3a3a3a;
  background: #2a2a2a;
  position: relative;
  cursor: pointer;
}

.forward-check::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 4px;
  height: 8px;
  border-right: 2px solid #111111;
  border-bottom: 2px solid #111111;
  transform: rotate(45deg);
  opacity: 0;
}

.forward-check:checked {
  background: #2ed46e;
  border-color: #2ed46e;
}

.forward-check:checked::after {
  opacity: 1;
}

.forward-avatar-wrap {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  background: #0f0f0f;
  border: 2px solid #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.forward-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.forward-avatar.avatar-fallback {
  object-fit: contain;
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

.forward-avatar-wrap.avatar-fallback {
  background: #1b1b1b;
}

.forward-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.forward-name {
  font-size: 14px;
  font-weight: 600;
  color: #f1f1f1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.forward-recent {
  margin-left: auto;
  font-size: 11px;
  color: #7adf9c;
  background: rgba(46, 212, 110, 0.15);
  padding: 2px 8px;
  border-radius: 999px;
}

.forward-empty {
  color: #9aa0a6;
  font-size: 13px;
  padding: 12px;
  text-align: center;
}

.message-action-item {
  width: 100%;
  background: transparent;
  border: none;
  color: #f2f2f2;
  padding: 8px 12px;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.message-action-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.reply-preview {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1f1f1f;
  border: 1px solid #2c2c2c;
  border-radius: 10px;
  padding: 8px 10px;
  margin: 0 0 6px 0;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
}

.reply-preview-bar {
  width: 4px;
  height: 36px;
  border-radius: 6px;
  background: #2ed46e;
}

.reply-preview-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.reply-preview-name {
  color: #2ed46e;
  font-weight: 600;
  font-size: 12px;
}

.reply-preview-text {
  color: #d9d9d9;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-preview-close {
  border: none;
  background: transparent;
  color: #cfcfcf;
  font-size: 18px;
  cursor: pointer;
}

.message-reaction-tray {
  position: absolute;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: #1f1f1f;
  border: 1px solid #2f2f2f;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.emoji-picker.is-reaction {
  position: fixed;
  bottom: auto;
  z-index: 1000;
}

.message-reaction-tray .reaction-emoji,
.message-reaction-tray .reaction-more {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.message-reaction-tray .reaction-emoji:hover,
.message-reaction-tray .reaction-more:hover {
  background: rgba(255, 255, 255, 0.08);
}

.message-reactions {
  position: absolute;
  bottom: -14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.message-bubble.from-me .message-reactions {
  right: 8px;
}

.message-bubble.from-them .message-reactions {
  left: 8px;
}

.message-reaction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  background: #2a2a2a;
  border: 1px solid #333;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  font-weight: 500;
}

.message-reaction:hover {
  background: #353535;
}

.modal.reaction-modal {
  width: min(420px, 96vw);
  max-height: 75vh;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.reaction-modal-overlay {
  background: transparent;
  pointer-events: auto;
}

.reaction-modal .modal-header {
  display: none;
}

.reaction-modal .modal-body {
  max-height: 65vh;
  overflow: auto;
}

.reaction-modal .modal-footer {
  display: none;
}

.reaction-modal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reaction-modal-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.reaction-modal-tab {
  border: none;
  background: transparent;
  color: #d8d8d8;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 8px;
  border-bottom: 2px solid transparent;
}

.reaction-modal-tab.is-active {
  color: #2ed46e;
  border-bottom-color: #2ed46e;
}

.reaction-modal-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reaction-modal-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: #1f1f1f;
  border: 1px solid #2b2b2b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reaction-modal-emoji {
  font-size: 18px;
}

.message-bubble.is-pending {
  opacity: 0.75;
}

.message-bubble.is-error {
  opacity: 0.85;
  border: 1px solid rgba(255, 107, 107, 0.6);
}

.message-status {
  font-size: 11px;
  margin-top: 4px;
  opacity: 0.7;
}

.message-status.is-error {
  color: #ff6b6b;
  opacity: 1;
}

.message-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message-text {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.message-contact-name {
  font-size: 12px;
  font-weight: 600;
  color: #7ad4ff;
  margin-bottom: 4px;
}

.message-text a {
  color: #7ad4ff;
  text-decoration: underline;
}

.message-text code {
  background: rgba(255, 255, 255, 0.12);
  padding: 1px 4px;
  border-radius: 4px;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 12px;
}

.message-link-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #1f1f1f;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.message-bubble.from-me .message-link-preview {
  background: #003621;
  border-color: #0f2e22;
}

.message-link-preview-media {
  width: 100%;
  overflow: hidden;
}

.message-link-preview-image {
  width: 100%;
  height: 160px; /* Force fixed height for consistent cover */
  object-fit: cover;
  display: block;
}

.message-bubble a {
    text-decoration: none !important;
    color: inherit;
    border: none !important;
}

.message-bubble a:hover {
    text-decoration: none !important;
}

.message-link-preview-info {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message-link-preview-title {
  font-weight: 600;
  font-size: 13px;
  color: #ffffff;
}

.message-link-preview-desc {
  font-size: 12px;
  color: #d0d0d0;
  line-height: 1.35;
}

.message-link-preview-host {
  font-size: 11px;
  color: #b5b5b5;
}

.message-bubble.has-link-preview {
  max-width: 330px !important;
  width: 100%;
}

@media (max-width: 768px) {
  .message-bubble.has-link-preview {
    max-width: 80% !important;
  }
}

.message-link-preview-title,
.message-link-preview-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.message-link-preview {
  text-decoration: none;
}

.message-link-preview .message-link-preview-title,
.message-link-preview .message-link-preview-desc,
.message-link-preview .message-link-preview-host {
  text-decoration: none;
}

.message-search-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 90vw;
  height: 100%;
  background: #141414;
  border-left: 1px solid #2b2b2b;
  z-index: 70;
  display: flex !important; /* Force flex for layout */
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.message-search-drawer.is-open {
  transform: translateX(0);
}

.message-search-header {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid #2b2b2b;
  flex-shrink: 0;
}

.message-search-title {
  font-size: 16px;
  font-weight: 600;
  color: #e1e1e1;
}

.message-search-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #b0b0b0;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.message-search-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.message-search-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.message-search-input {
  padding: 16px;
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.message-search-input img {
  position: absolute;
  left: 28px;
  width: 16px;
  height: 16px;
  opacity: 0.5;
  pointer-events: none;
  filter: invert(1);
}

.message-search-input input {
  width: 100%;
  height: 40px;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  padding: 0 36px 0 36px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.message-search-input input:focus {
  border-color: #2ed46e;
}

.message-search-clear {
  position: absolute;
  right: 28px;
  background: none;
  border: none;
  color: #b0b0b0;
  font-size: 18px;
  cursor: pointer;
  display: none;
}

.message-search-input input:valid ~ .message-search-clear {
  display: block;
}

.message-search-results {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 16px 16px;
}

.message-search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
}

.message-search-loading .loading-spinner {
  width: 52px;
  height: 52px;
  border-width: 3px;
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
}

.message-search-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
}

.message-search-overlay:not([hidden]) {
  opacity: 1;
  visibility: visible;
}

.message-search-item {
  padding: 12px;
  border: 1px solid #2b2b2b;
  border-radius: 12px;
  background: #1c1c1c;
  margin-top: 12px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.message-search-item:last-child {
  margin-bottom: 0;
}

.message-search-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.message-search-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #888;
}

.message-search-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.message-search-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  background: transparent;
  flex: 0 0 auto;
  display: block;
}

.message-search-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.message-search-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #e9e9e9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-search-card-meta {
  font-size: 12px;
  color: #9e9e9e;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.message-search-item-text {
  font-size: 13px;
  color: #e1e1e1;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.message-search-item-text mark {
  background: rgba(107, 203, 239, 0.3);
  color: #fff;
  padding: 0;
  border-radius: 2px;
}

.quoted-container {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.quoted-container.is-right {
  background: rgba(0, 0, 0, 0.2);
}

.quoted-side {
  width: 4px;
  background: #6bcbef;
}

.quoted-side.is-right {
  background: #35cd96;
}

.quoted-content {
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quoted-name {
  font-size: 12px;
  font-weight: 600;
  color: #7ad4ff;
}

.quoted-text {
  font-size: 12px;
  color: #e0e0e0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.message-audio {
  margin-bottom: 6px;
}

.message-audio audio {
  width: 260px;
  max-width: 100%;
}

.message-attachment-audio {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  flex: 0 1 auto;
}

.message-attachment-audio .message-audio {
  margin: 0;
  width: auto;
}

.message-attachment-audio .audio-player {
  min-width: 0;
  width: auto;
  grid-template-columns: auto 1fr;
}

.message-attachment-audio .audio-wave-wrap {
  width: 120px;
}

.message-attachment-preview.has-audio-preview .message-attachment-label {
  display: none;
}

.message-attachment-preview.has-audio-preview .message-attachment-remove {
  margin-left: 0;
}

.message-attachment-preview.has-audio-preview {
  justify-content: flex-start;
}

.audio-player {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
  background: transparent;
  min-width: 260px;
}

.audio-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
}

.audio-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  transition: filter 0.2s ease;
}

.audio-avatar.avatar-fallback {
  object-fit: contain;
  filter: brightness(0) invert(1);
  width: calc(100% - 18px);
  height: calc(100% - 18px);
  margin: 9px;
}

.audio-avatar-wrap.avatar-fallback {
  background: #2a2a2a;
  padding: 0;
  border-radius: 50%;
  box-sizing: border-box;
  border: 2px solid #25d366;
}

.audio-avatar.is-blurred {
  filter: blur(2px) brightness(0.9);
}

.audio-play {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.audio-play img {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
}

.audio-wave-wrap {
  position: relative;
  width: 180px;
  height: 24px;
  cursor: pointer;
}

.audio-wave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.audio-wave-progress {
  --progress: 0%;
  clip-path: inset(0 calc(100% - var(--progress)) 0 0);
}

.audio-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.audio-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #bdbdbd;
}

.audio-time {
  font-size: 11px;
  color: #d6d6d6;
  white-space: nowrap;
}

.audio-speed {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 28px;
  height: 18px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: 10px;
  padding: 0;
  cursor: pointer;
}

.message-media {
  width: 260px;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  cursor: pointer;
}

.message-sticker {
  width: 200px;
  max-width: 80%;
  border-radius: 10px;
  cursor: default;
}

.message-bubble.is-sticker {
  background: transparent !important;
  padding: 0;
}

.message-bubble.is-image {
  max-width: 300px;
}

.message-media-video {
  width: 100%;
  max-width: 360px;
  border-radius: 10px;
}

.message-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 9999;
}

.message-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.message-lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.message-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
  max-width: 320px;
}

.message-file-pdf {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 0;
  max-width: 360px;
  background: transparent;
  contain: layout paint;
}

.message-pdf-preview {
  width: 100%;
  height: 160px;
  border-radius: 8px;
  background: #1a1a1a;
  overflow: hidden;
  pointer-events: none;
  position: relative;
}

.message-pdf-preview iframe {
  width: 100%;
  height: 220px;
  border: none;
  position: relative;
  top: -12px;
  margin-right: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.message-pdf-preview canvas {
  display: block;
  width: 100%;
  height: 100%;
}



.message-pdf-preview.loaded iframe {
  opacity: 1;
}

.message-pdf-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 100%);
  background-size: 200% 100%;
  animation: message-pdf-shimmer 1.2s ease-in-out infinite;
}

.message-pdf-preview.loaded .message-pdf-skeleton {
  opacity: 0;
  animation: none;
}

@keyframes message-pdf-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.message-pdf-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 720px) {
  .message-file-pdf {
    max-width: 100%;
  }

  .message-pdf-preview {
    height: 190px;
  }
}

.message-pdf-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.message-pdf-badge {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #c62828;
  border-radius: 6px;
  padding: 4px 6px;
  letter-spacing: 0.4px;
}

.message-file-name {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.message-pdf-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  font-size: 16px;
}

.message-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
}

.message-menu-title {
  font-weight: 700;
  color: #e8e8e8;
}

.message-menu-toggle {
  width: 100%;
  border: 1px solid #2a2a2a;
  background: rgba(0, 0, 0, 0.18);
  color: #dcdcdc;
  padding: 8px 10px;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
}

.message-menu-toggle:hover {
  border-color: #3a3a3a;
}

.message-menu-list {
  list-style: none;
  padding: 6px 10px;
  margin: 0;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  border: 1px solid #2a2a2a;
  color: #cfcfcf;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.message-file span {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.message-tool.is-recording {
  background: #6b1d1d;
}

.message-bubble.from-me {
  align-self: flex-end;
  background: #144d37;
}

.message-bubble.from-me.is-instagram {
  background: #E1306C;
}

.message-bubble.from-them {
  align-self: flex-start;
  background: #242626;
}

.message-bubble.is-audio {
  background: transparent !important;
  padding: 0;
}

.message-bubble.is-audio .audio-player {
  background: #242626;
  padding: 8px 12px;
  border-radius: 16px;
}

.message-bubble.is-audio.from-me .audio-player {
  background: #144d37;
}

.message-bubble.is-audio.from-me.is-instagram .audio-player {
  background: #E1306C;
}

.message-bubble.is-audio.from-me.is-instagram .audio-avatar-wrap.avatar-fallback {
  border-color: #E1306C;
}

.message-bubble.is-audio.from-me.is-instagram .audio-play {
  background: rgba(255, 255, 255, 0.2);
}

.message-bubble.is-audio.from-me.is-instagram .audio-play:hover {
  background: rgba(255, 255, 255, 0.32);
}

.message-footer {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
}

.message-time {
  font-size: 10px;
  color: #bdbdbd;
}

.message-time.is-pending,
.audio-time.is-pending {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.message-time-icon {
  width: 12px;
  height: 12px;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url("/assets/icons/clock.svg") no-repeat center / contain;
  mask: url("/assets/icons/clock.svg") no-repeat center / contain;
  opacity: 0.8;
}

.send-message-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0;
  background: #2a2a2a;
  border-radius: var(--composer-radius, 999px);
  margin: 8px 12px 12px;
  position: sticky;
  bottom: 12px;
  z-index: 4;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.media-drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.media-drop-card {
  width: min(860px, calc(100vw - 80px));
  height: min(520px, calc(100vh - 160px));
  border-radius: 20px;
  border: 2px dashed #35be6e;
  background: rgba(13, 63, 44, 0.92);
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  display: grid;
  place-items: center;
  padding: 20px;
}

.media-drop-title {
  color: #d6f7e3;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 500;
  text-align: center;
}

.send-message-form.is-disabled {
  opacity: 0.6;
}

.send-message-form.is-disabled textarea,
.send-message-form.is-disabled button,
.send-message-form.is-disabled .message-tool {
  pointer-events: none;
}

.send-message-form.is-compact {
  display: flex;
}

.message-input-tools {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 0 8px 12px;
}

.message-tool {
  border: none;
  background: transparent;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.message-tool:hover {
  background: rgba(255, 255, 255, 0.08);
}

.atendimentos-page.channel-instagram .message-tool:hover {
  background: rgba(225, 48, 108, 0.2);
}

.message-tool img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.send-message-form input,
.send-message-form textarea {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 8px 12px;
  color: #ffffff;
  outline: none;
  resize: none;
  line-height: 18px;
  min-height: 34px;
  max-height: 160px;
  overflow-y: hidden;
  box-sizing: border-box;
}

.send-message-form textarea::placeholder,
.send-message-form input::placeholder {
  line-height: 18px;
}

.send-message-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 6px 10px 6px 0;
  flex-shrink: 0;
}

.send-message-button img {
  filter: brightness(0) invert(1);
}

.send-message-button:hover {
  background: #35be6e;
}

.atendimentos-page.channel-instagram .send-message-button:hover {
  background: #E1306C;
}

.send-message-button:hover img {
  filter: none;
}

.send-message-button.is-send {
  background: #35be6e;
}

.atendimentos-page.channel-instagram .send-message-button.is-send {
  background: #E1306C;
}

.send-message-button.is-send img {
  filter: none;
}

.send-message-button.is-recording {
  background: #e53935;
  animation: pulse-record 1.2s ease-in-out infinite;
}

.send-message-button.is-recording img {
  filter: brightness(0) invert(1);
}

@keyframes pulse-record {
  0% {
    box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.6);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(229, 57, 53, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(229, 57, 53, 0);
  }
}

.message-attachment-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #2b2b2b;
  color: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  overflow: visible;
}

.message-attachment-preview.has-media-preview {
  width: calc(100% - 12px);
  max-width: calc(100% - 12px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 8px;
  border-radius: 16px;
  padding: 10px;
  margin: 6px 6px 0;
  background: #1f1f1f;
}

.message-attachment-media {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.message-attachment-media-stage {
  border-radius: 12px;
  overflow: hidden;
  background: #101010;
  border: 1px solid rgba(255,255,255,0.08);
  min-height: 120px;
  display: grid;
  place-items: center;
}

.message-attachment-media-el {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: #101010;
}

.message-attachment-media-name {
  font-size: 12px;
  color: #d6d6d6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-attachment-media-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.message-attachment-thumb {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #111;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.message-attachment-thumb.is-active {
  border-color: #35be6e;
  box-shadow: 0 0 0 2px rgba(53,190,110,0.18);
}

.atendimentos-page.channel-instagram .message-attachment-thumb.is-active {
  border-color: #E1306C;
  box-shadow: 0 0 0 2px rgba(225,48,108,0.18);
}

.message-attachment-thumb img,
.message-attachment-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.message-attachment-thumb-badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border-radius: 6px;
  padding: 2px 4px;
  font-size: 9px;
  line-height: 1;
}

.message-attachment-label {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.message-audio-waveform {
  display: block;
  width: 140px;
  height: 20px;
  transform: scaleY(1.35);
  transform-origin: center;
  margin: 0 auto;
}

.message-audio-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  color: #e6e6e6;
  font-size: 12px;
}

.message-attachment-remove {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.message-attachment-preview.has-media-preview .message-attachment-label {
  display: none;
}

.message-attachment-preview.has-media-preview .message-attachment-remove {
  margin-top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.media-compose-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.media-compose-modal {
  width: min(980px, calc(100vw - 32px));
  height: min(760px, calc(100vh - 32px));
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  padding: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}

.media-compose-topbar { display:flex; align-items:center; gap:8px; }
.media-compose-spacer { flex:1; }

.media-compose-iconbtn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.media-compose-iconbtn:hover { background: rgba(255,255,255,0.1); }

.media-compose-stage {
  min-height: 0;
  border-radius: 14px;
  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,0.05);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.media-compose-stage img,
.media-compose-stage video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.media-compose-caption-row { display:flex; }

.media-compose-caption {
  width: 100%;
  min-height: 48px;
  max-height: 120px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #1a1a1a;
  color: #fff;
  resize: none;
  outline: none;
  padding: 12px 14px;
  line-height: 1.35;
}

.media-compose-caption::placeholder { color: #a3a3a3; }

.media-compose-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.media-compose-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  min-height: 64px;
}

.media-compose-thumb {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0f0f0f;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.media-compose-thumb.is-active {
  border-color: #35be6e;
  box-shadow: 0 0 0 2px rgba(53,190,110,0.18);
}

.atendimentos-page.channel-instagram .media-compose-thumb.is-active {
  border-color: #E1306C;
  box-shadow: 0 0 0 2px rgba(225,48,108,0.18);
}

.media-compose-thumb img,
.media-compose-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-compose-thumb-badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  background: rgba(0,0,0,.65);
  color: #fff;
  border-radius: 6px;
  padding: 2px 4px;
  font-size: 9px;
  line-height: 1;
}

.media-compose-send {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: #35be6e;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.atendimentos-page.channel-instagram .media-compose-send { background: #E1306C; }

.media-compose-send img {
  width: 20px;
  height: 20px;
  filter: none;
}

.emoji-picker {
  position: absolute;
  bottom: 64px;
  left: 18px;
  background: #1b1b1b;
  border: 1px solid #2c2c2c;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  width: min(360px, 86vw);
  max-height: 280px;
}

.emoji-picker.is-full {
  padding: 0;
  overflow: hidden;
}

.emoji-picker.is-full .emoji-tabs,
.emoji-picker.is-full .emoji-grid {
  display: none;
}

.emoji-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.emoji-tab {
  border: none;
  background: transparent;
  color: transparent;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 0;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: #bdbdbd;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: 18px 18px;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: 18px 18px;
}

.emoji-tab.is-active {
  background-color: #2ed46e;
}

.emoji-tab::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #2ed46e;
  opacity: 0;
  transform: translateX(-50%);
}

.emoji-tab.is-active::after {
  opacity: 1;
}

.emoji-tab:hover {
  background-color: #d6d6d6;
}

.emoji-tab.is-active:hover {
  background-color: #2ed46e;
}

.emoji-tab.category-recentes {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 7v5l3 3'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 7v5l3 3'/></svg>");
}

.emoji-tab.category-carinhas {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><circle cx='9' cy='10' r='1' fill='%23fff'/><circle cx='15' cy='10' r='1' fill='%23fff'/><path d='M8 15c1.2 1.2 2.6 1.8 4 1.8s2.8-.6 4-1.8'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><circle cx='9' cy='10' r='1' fill='%23fff'/><circle cx='15' cy='10' r='1' fill='%23fff'/><path d='M8 15c1.2 1.2 2.6 1.8 4 1.8s2.8-.6 4-1.8'/></svg>");
}

.emoji-tab.category-gestos {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M7 11v-2a2 2 0 1 1 4 0v2'/><path d='M11 11V7a2 2 0 1 1 4 0v4'/><path d='M15 11V8a2 2 0 1 1 4 0v6a5 5 0 0 1-10 0v-3'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M7 11v-2a2 2 0 1 1 4 0v2'/><path d='M11 11V7a2 2 0 1 1 4 0v4'/><path d='M15 11V8a2 2 0 1 1 4 0v6a5 5 0 0 1-10 0v-3'/></svg>");
}

.emoji-tab.category-coracao {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 8.5c0 4.2-8 9.5-8 9.5s-8-5.3-8-9.5C4 6 5.8 4 8 4c1.5 0 2.9.8 4 2 1.1-1.2 2.5-2 4-2 2.2 0 4 2 4 4.5z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 8.5c0 4.2-8 9.5-8 9.5s-8-5.3-8-9.5C4 6 5.8 4 8 4c1.5 0 2.9.8 4 2 1.1-1.2 2.5-2 4-2 2.2 0 4 2 4 4.5z'/></svg>");
}

.emoji-tab.category-objetos {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='5' y='5' width='14' height='14' rx='3'/><path d='M8 12h8'/><path d='M12 8v8'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='5' y='5' width='14' height='14' rx='3'/><path d='M8 12h8'/><path d='M12 8v8'/></svg>");
}

.emoji-tab.category-animais {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='15' r='4'/><circle cx='6.5' cy='9' r='1.5' fill='%23fff'/><circle cx='10' cy='7' r='1.5' fill='%23fff'/><circle cx='14' cy='7' r='1.5' fill='%23fff'/><circle cx='17.5' cy='9' r='1.5' fill='%23fff'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='15' r='4'/><circle cx='6.5' cy='9' r='1.5' fill='%23fff'/><circle cx='10' cy='7' r='1.5' fill='%23fff'/><circle cx='14' cy='7' r='1.5' fill='%23fff'/><circle cx='17.5' cy='9' r='1.5' fill='%23fff'/></svg>");
}

.emoji-tab.category-comida {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 4v6'/><path d='M9 4v6'/><path d='M6 7h3'/><path d='M13 4v16'/><path d='M17 4c1.5 2 1.5 4 0 6-1.5-2-1.5-4 0-6z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 4v6'/><path d='M9 4v6'/><path d='M6 7h3'/><path d='M13 4v16'/><path d='M17 4c1.5 2 1.5 4 0 6-1.5-2-1.5-4 0-6z'/></svg>");
}

.emoji-tab.category-simbolos {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3l1.8 4.6L18 9.2l-4.2 1.6L12 15l-1.8-4.2L6 9.2l4.2-1.6L12 3z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3l1.8 4.6L18 9.2l-4.2 1.6L12 15l-1.8-4.2L6 9.2l4.2-1.6L12 3z'/></svg>");
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  overflow-y: auto;
}

.emoji-grid button {
  border: none;
  background: #2b2b2b;
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  font-size: 16px;
}

.emoji-grid button:hover {
  background: #353535;
}

.send-message-button img {
  width: 20px;
  height: 20px;
}

@media (max-width: 960px) {
  .tickets-page,
  .tickets-page * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
  }

  .tickets-page button:focus,
  .tickets-page a:focus,
  .tickets-page [role="button"]:focus {
    outline: none;
  }

  .tickets-page button:focus-visible,
  .tickets-page a:focus-visible,
  .tickets-page [role="button"]:focus-visible {
    outline: none;
  }

  .tickets-page {
    grid-template-columns: 1fr;
    height: 100%;
    min-height: 100%;
    position: relative;
  }

  .tickets-sidebar {
    max-height: none;
    height: 100vh;
  }

  .tickets-chat {
    display: none;
    height: 100%;
  }

  .tickets-page.is-chat-open .tickets-sidebar {
    display: none;
  }

  .tickets-page.is-chat-open .tickets-chat {
    display: flex;
  }

  .ticket-back-btn {
    display: inline-flex;
  }

  .ticket-chat-header {
    position: sticky;
    top: 0;
    z-index: 6;
  }

  .messages-list {
    padding-bottom: 132px;
  }

  .send-message-form {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(56px + 12px);
    margin: 0;
    z-index: 7;
    gap: 8px;
    justify-content: space-between;
  }

  .media-drop-card {
    width: calc(100vw - 24px);
    height: calc(100vh - 120px);
    border-radius: 16px;
  }

  .media-drop-title {
    font-size: 18px;
  }

  .message-input-tools {
    gap: 4px;
    padding: 6px 0 6px 8px;
  }

  .message-tool {
    width: 30px;
    height: 30px;
  }

  .send-message-button {
    width: 40px;
    height: 40px;
    margin: 4px 8px 4px 0;
  }

  .send-message-form.is-recording textarea,
  .send-message-form.has-audio textarea {
    display: none;
  }

  .send-message-form.is-recording .message-attachment-preview,
  .send-message-form.has-audio .message-attachment-preview {
    flex: 1;
    justify-content: center;
  }

  .send-message-form.is-recording .send-message-button,
  .send-message-form.has-audio .send-message-button {
    margin-left: auto;
  }

  .message-attachment-preview {
    max-width: 100%;
  }

  .message-attachment-preview.has-media-preview {
    width: calc(100% - 8px);
    max-width: calc(100% - 8px);
    margin: 4px 4px 0;
    padding: 8px;
  }

  .message-attachment-media-el {
    max-height: 170px;
  }

  .message-attachment-thumb {
    width: 46px;
    height: 46px;
  }

  .media-compose-overlay {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }

  .media-compose-modal {
    width: 100vw;
    height: 100vh;
    max-width: none;
    border-radius: 0;
    border: none;
    padding: 10px;
    gap: 8px;
  }

  .media-compose-caption {
    min-height: 44px;
    padding: 10px 12px;
  }

  .media-compose-thumb {
    width: 52px;
    height: 52px;
  }

  .media-compose-send {
    width: 46px;
    height: 46px;
  }

  .message-audio-waveform {
    width: 110px;
  }

  .message-bubble.is-audio {
    max-width: 90%;
  }

  .message-bubble.is-pdf,
  .message-bubble.is-document,
  .message-bubble.is-video {
    max-width: 92%;
  }

  .audio-player {
    min-width: 0;
    width: 100%;
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .audio-content {
    min-width: 0;
  }

  .audio-wave-wrap {
    width: 120px;
    transform: none;
  }

  .audio-meta {
    width: 100%;
  }
}

@media (min-width: 961px) {
  .send-message-form.has-audio textarea {
    display: none;
  }

  .send-message-form.has-audio .message-attachment-preview {
    flex: 1;
  }

  .send-message-form.has-media textarea {
    flex-basis: calc(100% - 140px);
    margin-left: auto;
  }
}

/* =====================
   CAMPANHAS
===================== */
.campaigns-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: calc(100vh - 120px);
  background: #141414;
  padding: 12px;
  border-radius: 18px;
  height: 100%;
}

.campaigns-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 12px 16px;
  background: #141414;
  border-radius: 16px;
}

.campaigns-topbar .top-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.campaigns-topbar .top-title {
  flex: 0 0 auto;
  color: #d3d3d3;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.campaigns-container .spacer {
  flex: 1 1 auto;
}

.campaigns-content {
  padding: 16px;
  background: #141414;
  border-radius: 18px;
  border: none;
}

.campaigns-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.hero-card {
  background: #1f2f28;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(46, 212, 110, 0.35);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-title {
  font-size: 12px;
  color: #bfbfbf;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.hero-value {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
}

.hero-sub {
  font-size: 12px;
  color: #9f9f9f;
}

.campaigns-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 16px;
  max-height: 70vh;
  overflow: auto;
  padding-right: 4px;
}

.campaign-card {
  background: #1f1f1f;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid #2e2e2e;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.campaign-card:hover {
  background: #242424;
  border-color: #3a3a3a;
}

.campaign-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.campaign-card-title {
  font-weight: 700;
  color: #ffffff;
  font-size: 16px;
}

.campaign-card-subtitle {
  font-size: 12px;
  color: #b0b0b0;
}

.campaign-status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-inativa { background: #353535; color: #d0d0d0; }
.status-programada { background: #2f3b4e; color: #b9d1ff; }
.status-andamento { background: #1f3c2a; color: #2ed46e; }
.status-cancelada { background: #3d2a2a; color: #ff8f8f; }
.status-finalizada { background: #2a3d36; color: #9ff0c8; }

.campaign-card-body {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  width: 100%;
}

.campaign-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 1 1 auto;
}

.metric-item {
  font-size: 12px;
  color: #c8c8c8;
}

.metric-item strong {
  display: block;
  font-size: 13px;
  color: #ffffff;
  margin-top: 2px;
}

.campaign-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}

.progress-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: conic-gradient(#2ed46e calc(var(--percent) * 1%), #2c2c2c 0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.progress-ring.large {
  width: 120px;
  height: 120px;
}

.progress-ring-spin {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1px solid rgba(46, 212, 110, 0.2);
  animation: spin 2.5s linear infinite;
}

.progress-ring-label {
  width: 72%;
  height: 72%;
  background: #1a1a1a;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 6px;
}

.progress-ring-count {
  font-size: 18px;
  font-weight: 700;
}

.progress-ring-text {
  font-size: 11px;
  color: #a8a8a8;
}

.progress-info {
  font-size: 12px;
  color: #a8a8a8;
}

.campaign-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
}


.btn-icon img {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  margin: 0;
  filter: brightness(0) invert(1);
  opacity: 0.92;
  transition: opacity 0.15s;
  object-fit: contain;
}

.btn-icon.btn-danger img,
.btn-icon[data-action="delete"] img {
  filter: brightness(0) saturate(100%) invert(27%) sepia(83%) saturate(3552%) hue-rotate(350deg) brightness(97%) contrast(96%);
}

.campaigns-loading,
.campaigns-empty {
  text-align: center;
  color: #b0b0b0;
  margin-top: 12px;
}

.campaigns-loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pipeline-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.pipeline-workspace {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
}

.pipeline-main {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
}

.pipeline-chat-drawer {
  width: 0;
  flex: 0 0 auto;
  background: #0f0f0f;
  border-left: 1px solid #1f1f1f;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.2s ease;
}

.pipeline-chat-drawer.is-open {
  width: min(420px, 45vw);
}

.pipeline-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #161616;
  border-bottom: 1px solid #1f1f1f;
}

.pipeline-chat-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.pipeline-chat-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
}

.pipeline-chat-frame {
  border: 0;
  width: 100%;
  flex: 1 1 auto;
  background: #0f0f0f;
}

.pipeline-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 12px 16px;
  margin-top: 0;
  background: transparent;
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 20;
  background: #141414;
}

.pipeline-top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pipeline-spacer {
  flex: 1 1 auto;
}

.pipeline-title {
  color: #d3d3d3;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pipeline-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 12px;
  font-weight: 600;
  color: #e6e6e6;
}

.pipeline-summary .loading-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
}

.pipeline-lane-badge .loading-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: #000000;
}

.pipeline-filters {
  display: none;
}

.pipeline-search {
  display: flex;
  align-items: center;
}

.pipeline-search .text-input {
  min-width: 180px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #111;
  color: #fff;
  font-size: 12px;
  padding: 0 10px;
}

.pipeline-filters .input-select {
  min-width: 180px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #111;
  color: #fff;
  font-size: 12px;
  padding: 0 10px;
}

.pipeline-topbar #pipeline-filters-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;
  flex: 0 0 auto;
  width: auto;
}

.pipeline-topbar #pipeline-filters-open img {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
}

.pipeline-config-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.pipeline-config-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  min-height: auto;
}

.pipeline-config-title {
  font-weight: 700;
  color: #fff;
  font-size: 13px;
}

.pipeline-checklist {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  overflow-y: auto;
  max-height: 320px;
  padding-right: 4px;
}

.pipeline-checkitem {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #ddd;
}

.pipeline-checkitem input {
  accent-color: #00e676;
}

@media (max-width: 960px) {
  .pipeline-config-grid {
    grid-template-columns: 1fr;
  }
  .pipeline-filters {
    width: 100%;
    flex-wrap: wrap;
  }
  .pipeline-filters .input-select {
    flex: 1 1 160px;
    min-width: 0;
  }
  .pipeline-filter-type {
    flex: 1 1 160px;
    min-width: 0;
  }
  .pipeline-search {
    width: 100%;
  }
  .pipeline-search .text-input {
    flex: 1 1 auto;
    width: 100%;
  }
}

.pipeline-summary-item {
  background: #0b2b1c;
  color: #8fffc1;
  border: 1px solid #1f5f3f;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
}

.pipeline-topbar .btn-solid {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  background: #00e676;
  border-color: #00e676;
  color: #111111 !important;
  white-space: nowrap;
}

.pipeline-topbar .btn-solid img {
  width: 14px;
  height: 14px;
  filter: none !important;
}

.pipeline-topbar #pipeline-add-lane img {
  width: 18px;
  height: 18px;
}

.pipeline-topbar .btn-solid span {
  color: #111111 !important;
  display: inline-flex;
}

.pipeline-scrollbar {
  padding: 2px 12px 10px;
  min-height: 18px;
}

.pipeline-scrollbar.is-inactive {
  visibility: hidden;
}

.pipeline-scrollbar input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 10px;
  border-radius: 8px;
  background: #1a1a1a;
  outline: none;
  cursor: pointer;
}

.pipeline-scrollbar input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 60px;
  height: 10px;
  background: #444;
  border-radius: 8px;
  border: 2px solid #1a1a1a;
}

.pipeline-scrollbar input[type="range"]::-moz-range-thumb {
  width: 60px;
  height: 10px;
  background: #444;
  border-radius: 8px;
  border: 2px solid #1a1a1a;
}

.pipeline-content {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 0 12px;
  gap: 12px;
  overflow: hidden;
}

.pipeline-lanes {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 0;
  padding-left: 12px;
  padding-right: 12px;
  align-items: flex-start;
  position: relative;
  scrollbar-width: none;
  scrollbar-gutter: stable;
}

.pipeline-group-placeholder .pipeline-group-title {
  color: transparent;
}

.pipeline-group-placeholder .pipeline-group-line {
  background: transparent;
}

.pipeline-group-placeholder-wrap {
  padding: 0 12px;
}

.pipeline-group-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: max-content;
}

.pipeline-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.pipeline-group.pipeline-group--animate {
  opacity: 0;
  transform: translateY(6px);
  animation: pipelineGroupFadeIn 220ms ease-out forwards;
}
.pipeline-group-placeholder {
  animation: none;
  opacity: 1;
  transform: none;
}

@keyframes pipelineGroupFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pipeline-group-title {
  font-weight: 700;
  font-size: 14px;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.pipeline-group-line {
  height: 3px;
  border-radius: 999px;
  background: #2a2a2a;
  width: 100%;
}

.pipeline-group-lanes {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.pipeline-lanes::-webkit-scrollbar {
  height: 0;
}

.pipeline-lane {
  background: #262626;
  border-radius: 14px;
  min-width: 320px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 150px);
  transition: transform 120ms ease;
}

.pipeline-lane.is-first-visible {
  margin-left: 0;
}

.pipeline-lane-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pipeline-lane-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.pipeline-lane-badge {
  background: #00e676;
  color: #000;
  border-radius: 6px;
  padding: 2px 8px;
  font-weight: 700;
  font-size: 12px;
  min-width: 28px;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pipeline-lane-origins {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}

.pipeline-origin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  flex: 1 1 0;
  justify-content: center;
}

.pipeline-origin img {
  width: 14px;
  height: 14px;
  filter: invert(1);
}

.pipeline-origin.whatsapp {
  background: #25d366;
}

.pipeline-origin.instagram {
  background: #e1306c;
}

.pipeline-origin.external {
  background: #008081;
}

.pipeline-lane-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pipeline-lane-actions .btn-icon {
  padding: 3px;
}

.pipeline-lane-title {
  font-size: 14px;
  font-weight: 700;
  color: #f0f0f0;
  cursor: grab;
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
}

.pipeline-lane-title::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 28px;
  height: 100%;
  background: linear-gradient(to right, rgba(38, 38, 38, 0), #262626 80%);
  pointer-events: none;
}

.pipeline-lane-title:active {
  cursor: grabbing;
}

.pipeline-lane-counts {
  font-size: 12px;
  color: #9a9a9a;
}

.pipeline-lane-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  scrollbar-width: none;
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
}

.pipeline-lane-cards-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 12px 12px 16px;
  height: 100%;
}

.pipeline-lane-cards-inner::-webkit-scrollbar {
  width: 0;
}

.pipeline-lane-cards::-webkit-scrollbar {
  width: 0;
}

@property --lane-mask-top {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 22%;
}

@property --lane-mask-bottom {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 78%;
}

.pipeline-lane-cards.is-scrollable .pipeline-lane-cards-inner {
  --lane-mask-top: 22%;
  --lane-mask-bottom: 78%;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) var(--lane-mask-top), rgba(0, 0, 0, 1) var(--lane-mask-bottom), rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) var(--lane-mask-top), rgba(0, 0, 0, 1) var(--lane-mask-bottom), rgba(0, 0, 0, 0) 100%);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transition: --lane-mask-top 180ms ease, --lane-mask-bottom 180ms ease;
}

.pipeline-lane-cards.is-scrollable.is-at-bottom .pipeline-lane-cards-inner {
  --lane-mask-bottom: 100%;
}

.pipeline-lane-cards.is-scrollable.is-at-top .pipeline-lane-cards-inner {
  --lane-mask-top: 0%;
}

.pipeline-lane-cards.is-scrollable.is-at-bottom.is-at-top .pipeline-lane-cards-inner {
  --lane-mask-top: 0%;
  --lane-mask-bottom: 100%;
}

.pipeline-lane-cards.is-dragover {
  background: transparent;
  border-radius: 12px;
}

.pipeline-card {
  background: #2f2f2f;
  border-radius: 12px;
  padding: 10px 12px;
  color: #f3f3f3;
  cursor: grab;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pipeline-card--whatsapp {
  border-color: rgba(255, 255, 255, 0.05);
}

.pipeline-card--instagram {
  border-color: rgba(255, 255, 255, 0.05);
}

.pipeline-card--external {
  border-color: rgba(255, 255, 255, 0.05);
}

.pipeline-card.is-dragging {
  opacity: 0.6;
}

.pipeline-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.pipeline-card-avatar-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
}

.pipeline-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #00e676;
  flex: 0 0 auto;
  position: relative;
  border: 2px solid #2b2b2b;
  overflow: hidden;
  background: #1f1f1f;
}

.pipeline-card-avatar.ring-whatsapp {
  border-color: #2ed46e;
}

.pipeline-card-avatar.ring-instagram {
  border-color: #ff2d75;
}

.pipeline-card-avatar.ring-external {
  border-color: #008081;
}

.pipeline-card-avatar.placeholder .pipeline-card-avatar-img {
  width: 22px;
  height: 22px;
  filter: invert(1);
  display: block;
  object-fit: contain;
}

.pipeline-config-multi .multi-select-trigger {
  width: 100%;
  min-height: 38px;
  background: #2a2a2a;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  padding: 10px 12px;
  color: #ffffff;
  text-align: left;
  position: relative;
  padding-right: 32px;
}

.pipeline-config-multi .multi-select-trigger::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #bdbdbd;
  font-size: 12px;
}

.pipeline-config-multi .multi-select-menu {
  background: #1f1f1f;
  border: 1px solid #2a2a2a;
  max-height: none;
  overflow: visible;
  display: none;
  border-radius: 10px;
  padding: 8px;
}

.pipeline-config-multi .multi-select-menu.open {
  display: block;
}

.pipeline-config-multi .multi-select-item {
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  color: #e6e6e6;
}

.pipeline-config-multi .multi-select-item.is-selected {
  background: transparent;
  color: #e6e6e6;
  font-weight: 500;
}

.pipeline-config-multi .multi-select-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pipeline-config-multi .multi-select-item span {
  position: relative;
  padding-left: 26px;
}

.pipeline-config-multi .multi-select-item span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2a2a2a;
  border: 2px solid #3a3a3a;
}

.pipeline-config-multi .multi-select-item input:checked + span::before {
  background: #00e676;
  border-color: #00e676;
}

.pipeline-config-multi .multi-select-item span::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
}

.pipeline-config-multi .multi-select-item input:checked + span::after {
  content: "✓";
  color: #111111;
  font-size: 12px;
  line-height: 1;
}

.pipeline-card-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.pipeline-card-badge {
  position: absolute;
  bottom: -4px;
  left: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 2px solid #101010;
  z-index: 2;
}

.pipeline-card-badge-icon {
  width: 12px;
  height: 12px;
  filter: invert(1);
}

.pipeline-card-badge.badge-whatsapp {
  background: #25d366;
}

.pipeline-card-badge.badge-instagram {
  background: #e1306c;
}

.pipeline-card-badge.badge-external {
  background: #008081;
}

.pipeline-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}

.pipeline-card-user {
  font-size: 11px;
  color: #bcbcbc;
}

.pipeline-card-top-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-self: flex-start;
  justify-items: center;
}

.pipeline-card-top-actions .btn-icon {
  padding: 3px;
}

.pipeline-card-top-actions .btn-icon img {
  width: 14px;
  height: 14px;
  filter: invert(1);
}

.pipeline-card-top-actions .btn-icon.btn-danger img {
  filter: brightness(0) saturate(100%) invert(27%) sepia(83%) saturate(3552%) hue-rotate(350deg) brightness(97%) contrast(96%);
}

.pipeline-modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.pipeline-contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.pipeline-modal-panels {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pipeline-modal-tab {
  border: none;
  background: #2a2a2a;
  color: #cfcfcf;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
}

.pipeline-modal-tab.is-active {
  background: #3a3a3a;
  color: #ffffff;
}

.pipeline-modal-panel {
  display: none;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  min-height: 0;
  flex: 1;
}

.pipeline-modal-panel.is-active {
  display: flex;
  flex: 1;
  min-height: 0;
}

@property --notes-mask-top {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 22%;
}

@property --notes-mask-bottom {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 78%;
}

.contact-notes-panel {
  scrollbar-width: none;
}

.contact-notes-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.contact-notes-panel.is-scrollable {
  --notes-mask-top: 22%;
  --notes-mask-bottom: 78%;
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 1) var(--notes-mask-top),
    rgba(0, 0, 0, 1) var(--notes-mask-bottom),
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 1) var(--notes-mask-top),
    rgba(0, 0, 0, 1) var(--notes-mask-bottom),
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transition: --notes-mask-top 180ms ease, --notes-mask-bottom 180ms ease;
}

.contact-notes-panel.is-scrollable.is-at-top {
  --notes-mask-top: 0%;
}

.contact-notes-panel.is-scrollable.is-at-bottom {
  --notes-mask-bottom: 100%;
}

.contact-notes-panel.is-scrollable.is-at-top.is-at-bottom {
  --notes-mask-top: 0%;
  --notes-mask-bottom: 100%;
}

.pipeline-contact-form #pipeline-card-notes {
  resize: none;
  min-height: 90px;
}

.pipeline-card-channel {
  display: none !important;
}

.pipeline-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pipeline-card-subline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  font-size: 11px;
  color: #bcbcbc;
  min-width: 0;
}

.pipeline-card-date {
  font-size: 11px;
  color: #9f9f9f;
  white-space: nowrap;
  font-weight: 800;
}

.pipeline-card-channel {
  font-size: 10px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dcdcdc;
  text-transform: uppercase;
}

.pipeline-card-channel.whatsapp {
  background: rgba(37, 211, 102, 0.2);
  color: #25d366;
}

.pipeline-card-channel.instagram {
  background: rgba(225, 48, 108, 0.2);
  color: #e1306c;
}

.pipeline-card-channel.external {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.pipeline-card-meta {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #bcbcbc;
}

.pipeline-card-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.pipeline-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pipeline-card-value {
  border: 1px solid #c9c9c9;
  border-radius: 6px;
  padding: 2px 6px;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
}

.pipeline-card-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  color: #fff;
  border: 1px solid #35cd96;
  background: transparent;
}

.pipeline-card-actions {
  display: flex;
  gap: 8px;
}

.pipeline-lane.is-dragover-lane {
  box-shadow: none;
}

.pipeline-lane.is-dragging-lane {
  opacity: 1;
  visibility: visible;
  transition: none !important;
  will-change: transform;
}

.pipeline-lanes.is-dragging-lanes .pipeline-lane {
  transition: transform 80ms ease;
}

.pipeline-lanes.is-dragging-lanes,
.pipeline-lanes.is-dragging-lanes * {
  user-select: none;
}

.pipeline-lane-placeholder {
  border: none;
  background: transparent;
  min-height: 120px;
  min-width: 320px;
  opacity: 0;
}

.pipeline-card-placeholder {
  border: none;
  background: transparent;
  min-height: 64px;
  opacity: 0;
}

.pipeline-lane.is-dragging-lane * {
  pointer-events: none;
}

.pipeline-empty {
  text-align: center;
  color: #b0b0b0;
  padding: 12px 0;
}

.pipeline-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  z-index: 5;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lane-select option.lane-group-label {
  font-weight: 700;
  color: #f1f1f1;
  background: #343434;
}

.input-select,
.textarea-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1f1f1f;
  color: #e6e6e6;
}

.textarea-input {
  min-height: 90px;
  resize: vertical;
}

.pipeline-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.pipeline-checkitem {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #d0d0d0;
}

.form-label {
  font-size: 12px;
  color: #9f9f9f;
  font-weight: 600;
  text-transform: uppercase;
}

.pipeline-variables {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pipeline-variable-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

.pipeline-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pipeline-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #d0d0d0;
}

.connection-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #d0d0d0;
}

.connection-toggle input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #111111;
  border: 1px solid #2a2a2a;
  display: inline-block;
  position: relative;
}

.connection-toggle input[type="checkbox"]:checked {
  background: #2ed46e;
  border-color: #2ed46e;
}

.connection-toggle input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 9px;
  border: 2px solid #0e0e0e;
  border-top: 0;
  border-left: 0;
  transform: translate(-50%, -60%) rotate(45deg);
}

.btn-green {
  background: #00e676;
  color: #000;
  border-radius: 10px;
  border: 1px solid #00e676;
  height: 38px;
  padding: 0 12px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.btn-green:hover {
  filter: brightness(0.95);
}

.btn-add {
  background: #00e676;
  border: none;
  height: 38px;
  width: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 230, 118, 0.25);
  transition: transform 0.2s ease;
}

.btn-add:hover {
  transform: translateY(-1px);
}

.btn-add img {
  width: 18px;
  height: 18px;
}

.search-input {
  background: #202020;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 8px 12px;
  color: #fff;
  min-width: 200px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.form-grid.single-col {
  grid-template-columns: 1fr;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #d0d0d0;
  font-size: 13px;
}

.text-input,
.text-area {
  background: #202020;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  transition: border 0.2s ease;
  font-family: inherit;
  width: 100%;
}

.text-area {
  resize: none;
  overflow: hidden;
  min-height: 90px;
}

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

.text-input:focus,
.text-area:focus {
  border-color: #2ed46e;
  outline: none;
  box-shadow: none;
}

input[type="datetime-local"] {
  color-scheme: dark;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.9;
}

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

.contact-form-grid {
  grid-template-columns: 1fr;
}

.contact-number-inline {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
}

.contact-country {
  min-width: 100px;
  max-width: 130px;
  width: 110px;
  background: #111111;
  border: 1px solid #2a2a2a;
  color: #ffffff;
  color-scheme: dark;
}

.contact-number-inline .text-input,
.contact-number-inline .form-input {
  height: 38px;
  padding: 8px 10px;
  line-height: 1.2;
}

.contact-number-inline select.text-input,
.contact-number-inline .contact-country {
  height: 38px;
  padding: 8px 10px;
  line-height: 1.2;
  box-sizing: border-box;
  background: #111111;
  border: 1px solid #2a2a2a;
  color: #ffffff;
  color-scheme: dark;
}

.messages-block {
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.messages-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.message-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
  margin-bottom: 8px;
}

.contacts-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 16px;
}

.contacts-panel {
  background: #1f1f1f;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid #2e2e2e;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 60vh;
  overflow: auto;
}

.campaigns-modal {
  width: min(760px, 94vw);
}

.campaigns-modal .multi-select-item input[type="checkbox"] {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: none;
  background: #4a4a4a;
  display: inline-block;
  margin: 0;
}

.campaigns-modal .multi-select-item span {
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

.campaigns-modal .multi-select-item input[type="checkbox"]:checked {
  background: #2ed46e;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9'><path fill='black' d='M4.4 8.1L.6 4.3l1.4-1.4 2.4 2.4 5.2-5.2L11 1.5z'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 8px;
}

.campaigns-contacts-modal {
  width: min(980px, 95vw);
}

.campaigns-report-modal {
  width: min(720px, 92vw);
}

.form-section {
  background: #1c1c1c;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}

.pipeline-forms-modal {
  width: min(1200px, 96vw);
}

#pipeline-modal.pipeline-forms-modal .modal-body {
  max-height: 70vh;
  overflow: auto;
}

.pipeline-forms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.pipeline-forms-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.form-fields-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: #cfcfcf;
  cursor: pointer;
  user-select: none;
}

.form-toggle-input {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #3a3a3a;
  border: 1px solid #2a2a2a;
  display: inline-block;
  position: relative;
}

.form-toggle-input:checked {
  background: #2ed46e;
  border-color: #2ed46e;
}

.form-toggle-input:checked::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: #0e0e0e;
  border-radius: 999px;
}

.form-fields-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.form-field-add {
  background: #2ed46e;
  border-radius: 8px;
  padding: 6px;
}

.form-field-add img {
  filter: none;
  width: 16px;
  height: 16px;
}

.form-field-row {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  gap: 10px;
  align-items: center;
  background: #212121;
  border-radius: 10px;
  padding: 8px 10px;
}

.form-field-row.is-dragging {
  opacity: 0.6;
}

.form-field-drag {
  cursor: grab;
  padding: 4px;
}

.form-field-remove {
  background: #2a2a2a;
  border-radius: 8px;
  padding: 6px;
}

.form-field-toggle {
  background: #2a2a2a;
  border-radius: 8px;
  padding: 6px;
}

.form-field-toggle.is-on {
  background: #2ed46e;
}

.form-field-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.form-field-required {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #cfcfcf;
  margin-top: 4px;
}

.form-field-menu {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}

.form-field-menu .btn-primary {
  min-width: 120px;
  padding: 8px 14px;
  justify-content: center;
}

.form-field-required input[type="checkbox"] {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: #3a3a3a;
  border: 1px solid #2a2a2a;
  display: inline-block;
  position: relative;
}

.form-field-required input[type="checkbox"]:checked {
  background: #2ed46e;
  border-color: #2ed46e;
}

.form-field-required input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: #0e0e0e;
  border-radius: 2px;
}

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

.form-style-item input[type="color"] {
  width: 100%;
  height: 38px;
  border: 1px solid #2a2a2a;
  background: #111111;
  border-radius: 8px;
  padding: 4px;
  cursor: pointer;
  appearance: none;
}

.form-style-item input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.form-style-item input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.pipeline-form-preview {
  background: #151515;
}

.pipeline-form-preview-card {
  border: 1px dashed #2a2a2a;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  --field-bg: #111111;
  --field-text: #ffffff;
  --label-color: #d3d3d3;
  --title-color: #ffffff;
  --input-text: #ffffff;
  --button-bg: #2ed46e;
  --button-text: #0e0e0e;
}

.pipeline-form-preview-title {
  font-weight: 700;
  color: var(--title-color);
}

.pipeline-form-preview-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pipeline-form-preview-label {
  font-size: 12px;
  color: var(--label-color);
}

.pipeline-form-preview-input {
  background: var(--field-bg);
  color: var(--field-text);
  border: 1px solid var(--field-border, #2a2a2a);
  border-radius: 8px;
  padding: 8px 10px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.pipeline-form-preview-select {
  padding-right: 28px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--field-text) 50%),
    linear-gradient(135deg, var(--field-text) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 10px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  -webkit-appearance: none;
  appearance: none;
}

.pipeline-form-preview-phone {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
}

.pipeline-form-preview-ddi {
  background: var(--field-bg);
  color: var(--field-text);
  border: 1px solid var(--field-border, #2a2a2a);
  border-radius: 8px;
  padding: 8px 10px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  padding-right: 28px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--field-text) 50%),
    linear-gradient(135deg, var(--field-text) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 10px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.pipeline-form-preview-input:focus,
.pipeline-form-preview-ddi:focus {
  outline: none;
  box-shadow: none;
  border-color: var(--field-border-focus, #2ed46e);
  box-shadow: 0 0 10px color-mix(in srgb, var(--field-border-focus, #2ed46e) 70%, transparent);
}

.pipeline-form-preview-card .btn-primary {
  background: var(--button-bg);
  color: var(--button-text);
  margin-top: 10px;
  padding: 10px 16px;
  height: auto;
  line-height: 1.2;
}

@media (max-width: 1100px) {
  .pipeline-forms-grid {
    grid-template-columns: 1fr;
  }
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: #d8d8d8;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.form-grid.three-cols {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.select-multiple {
  min-height: 88px;
}

.messages-header {
  margin-bottom: 10px;
}

.messages-header .btn-add {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.datetime-field {
  position: relative;
}

.datetime-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: #ffffff;
  mask: url("/assets/icons/calendar.svg") no-repeat center / contain;
  -webkit-mask: url("/assets/icons/calendar.svg") no-repeat center / contain;
  cursor: pointer;
  z-index: 2;
}

.campaign-datetime {
  padding-right: 36px;
}

.contact-date-input {
  padding-right: 36px;
}

.campaigns-modal input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.campaigns-modal input[type="number"]::-webkit-inner-spin-button,
.campaigns-modal input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Flatpickr theme (verde do sistema) */
.flatpickr-calendar {
  background: #1b1b1b;
  border: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  color: #ffffff;
  z-index: 120;
  width: 320px;
  max-width: 90vw;
}

.flatpickr-calendar.open {
  margin-top: 6px;
}

.flatpickr-calendar * {
  color: inherit;
}

.flatpickr-calendar {
  color-scheme: dark;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
  border-bottom-color: transparent;
}

.flatpickr-months {
  background: #202020;
  border-bottom: none;
}

.flatpickr-months .flatpickr-month {
  background: #202020;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  width: 28px;
  height: 28px;
  top: 6px;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
  width: 14px;
  height: 14px;
  fill: #ffffff;
}

.flatpickr-weekdays {
  background: #202020;
}

.flatpickr-weekday {
  color: #ffffff !important;
  font-weight: 600;
}

.flatpickr-days {
  background: #1b1b1b;
}

.flatpickr-day {
  color: #ffffff !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: #6f6f6f !important;
}

.flatpickr-day:hover,
.flatpickr-day:focus,
.flatpickr-day.inRange,
.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover {
  background: #263b31 !important;
  border-color: #2ed46e !important;
  color: #ffffff !important;
}

.flatpickr-day.today {
  border-color: #2ed46e;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover {
  background: #2ed46e !important;
  border-color: #2ed46e !important;
  color: #0e0e0e !important;
}

.flatpickr-time {
  background: #202020;
  border-top: none;
}

.flatpickr-time input,
.flatpickr-time .flatpickr-time-separator {
  color: #ffffff !important;
}

.flatpickr-time input:hover,
.flatpickr-time input:focus {
  background: #242424 !important;
}

.flatpickr-time .numInputWrapper span.arrowUp:after,
.flatpickr-time .numInputWrapper span.arrowDown:after {
  border-color: #2ed46e transparent;
}

.flatpickr-time .numInputWrapper span.arrowUp,
.flatpickr-time .numInputWrapper span.arrowDown {
  display: none;
}

.flatpickr-months .flatpickr-month,
.flatpickr-current-month,
.flatpickr-weekday {
  color: #ffffff !important;
}

.flatpickr-day {
  color: #d8d8d8;
}

.flatpickr-day.today {
  border-color: #2ed46e;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover {
  background: #2ed46e;
  border-color: #2ed46e;
  color: #0e0e0e;
}

.flatpickr-time input,
.flatpickr-time .flatpickr-time-separator {
  color: #ffffff;
}

.flatpickr-time input:hover,
.flatpickr-time input:focus {
  background: #242424;
}

.flatpickr-time .numInputWrapper span.arrowUp:after,
.flatpickr-time .numInputWrapper span.arrowDown:after {
  border-color: #2ed46e transparent;
}

.message-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.message-tab {
  background: #232323;
  color: #d6d6d6;
  border: 1px solid #2d2d2d;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.message-tab.active {
  background: #2ed46e;
  color: #0e0e0e;
  border-color: #2ed46e;
}

.tab-close {
  font-weight: 700;
  cursor: pointer;
}

.message-panels {
  background: transparent;
  border-radius: 12px;
  padding: 0;
  border: none;
}

.contact-list-hint {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  padding: 24px 12px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.message-panel[hidden] {
  display: none !important;
}

.multi-select {
  position: relative;
}

.multi-select-trigger {
  width: 100%;
  background: #202020;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.multi-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #1b1b1b;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 8px;
  max-height: 220px;
  overflow: auto;
  display: none;
  z-index: 80;
}

.multi-select-menu.open {
  display: block;
}

.multi-select-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  color: #d9d9d9;
  cursor: pointer;
}

.multi-select-item input[type="checkbox"] {
  accent-color: #2ed46e;
  width: 16px;
  height: 16px;
}

.tags-modal-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
  margin-right: 2px;
}

.multi-select-item:hover {
  background: #262626;
}

.file-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.file-input {
  display: none;
}

.file-name {
  font-size: 12px;
  color: #bdbdbd;
}

.btn-file {
  background: #2ed46e;
  color: #0e0e0e;
  border: 1px solid #2ed46e;
  font-weight: 600;
}

.btn-file:hover {
  filter: brightness(0.95);
}

.message-item .text-area {
  min-height: 90px;
  resize: vertical;
}

.message-item .btn-icon {
  align-self: flex-start;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.panel-actions {
  display: flex;
  gap: 8px;
}

.contacts-container .contacts-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.contact-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  background: #242424;
  cursor: pointer;
}

.contact-list-row.active {
  border: 1px solid #2ed46e;
}

.contact-list-name {
  font-weight: 600;
  color: #fff;
}

.contact-list-count {
  font-size: 12px;
  color: #b0b0b0;
}

.contact-list-actions {
  display: flex;
  gap: 6px;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  background: #242424;
}

.contact-item-name {
  font-weight: 600;
  color: #fff;
}

.contact-item-meta {
  font-size: 12px;
  color: #b0b0b0;
}

.contact-item-status {
  font-size: 11px;
  margin-top: 4px;
  color: #ff8f8f;
}

.contact-item-status.valid {
  color: #2ed46e;
}

.contact-item-actions {
  display: flex;
  gap: 6px;
}

.validation-progress {
  background: #1a1a1a;
  border-radius: 10px;
  padding: 10px;
  color: #d0d0d0;
  font-size: 12px;
}

.validation-bar {
  height: 6px;
  border-radius: 999px;
  background: #2b2b2b;
  overflow: hidden;
  margin-top: 6px;
}

.validation-fill {
  height: 100%;
  background: #2ed46e;
  width: 0;
}

.empty-state {
  text-align: center;
  color: #b0b0b0;
  padding: 12px 0;
}

.report-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: center;
}

.report-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.report-panel {
  background: #1f1f1f;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.report-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.report-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.report-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #202020;
  border: 1px solid #2c2c2c;
}

.report-item-name {
  font-weight: 600;
  color: #ffffff;
  font-size: 13px;
}

.report-item-meta {
  font-size: 12px;
  color: #b0b0b0;
}

.report-item-time {
  font-size: 12px;
  color: #8dd8a5;
  white-space: nowrap;
}

.report-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #d0d0d0;
}

@media (max-width: 960px) {
  .campaigns-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }

  .campaigns-grid {
    max-height: none;
  }

  .campaigns-topbar .top-left {
    display: none;
  }

  .contacts-modal-grid {
    grid-template-columns: 1fr;
  }

  .report-summary {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .report-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .campaigns-grid {
    grid-template-columns: 1fr;
  }
}

.contact-avatar-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: #0f0f0f;
  border: 2px solid #2a2a2a; /* fallback */
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ===== CORES POR CANAL ===== */

.contact-avatar.ring-wa {
  border-color: #25d366;
}

.contact-avatar.ring-ig {
  border-color: #E1306C;
}

/* ===== PLACEHOLDER ===== */

.contact-avatar.placeholder svg,
.contact-avatar.placeholder img {
  width: 18px;
  height: 18px;
  opacity: 0.6;
}

/* ===== BADGE DA REDE (IGUAL ATENDIMENTOS) ===== */

.contact-badge {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0f0f0f;
}

.contact-badge img,
.contact-badge svg {
  width: 10px;
  height: 10px;
}

.contact-badge.wa {
  background: #25d366;
}

.contact-badge.ig {
  background: #E1306C;
}

.ticket-right-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.ticket-selection-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticket-selection-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #1f1f1f;
  border: 1px solid #2a2a2a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ticket-selection-btn img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.ticket-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #1f1f1f;
  border: 1px solid #2a2a2a;
  cursor: pointer;
  padding: 0;
}

.ticket-search-trigger img {
  width: 18px;
  height: 18px;
  filter: brightness(0) saturate(100%) invert(78%) sepia(0%) saturate(0%) hue-rotate(219deg) brightness(92%) contrast(85%);
}

.ticket-search-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
}

.messages-list .message-bubble {
  max-width: 70%;
}

.messages-list .message-bubble.from-me {
  background: #144d37;
}

.messages-list .message-bubble.from-them {
  background: #242626;
}

.messages-list .message-text a {
  color: #7ad4ff;
  text-decoration: underline;
}

.message-reply-trigger {
  display: none;
}

.message-menu-trigger {
  background: transparent;
  border: none;
  box-shadow: none;
}

.message-action-menu.from-me {
  background: #144d37;
  border-color: #0f2e22;
  box-shadow: 0 12px 24px rgba(20, 77, 55, 0.45);
}

.message-action-menu.from-them {
  background: #242626;
  border-color: #2a2a2a;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}
