/* Official chat styles replicated from devedoresfront. */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap");

:root {
  --font-outfit: Outfit, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --brand-25: #f2f7ff;
  --brand-50: #ecf3ff;
  --brand-100: #dde9ff;
  --brand-300: #9cb9ff;
  --brand-500: #465fff;
  --brand-600: #3641f5;
  --brand-700: #2a31d8;
  --gray-25: #fcfcfd;
  --gray-50: #f9fafb;
  --gray-100: #f2f4f7;
  --gray-200: #e4e7ec;
  --gray-300: #d0d5dd;
  --gray-400: #667085;
  --gray-500: #667085;
  --gray-600: #475467;
  --gray-700: #344054;
  --gray-800: #1d2939;
  --gray-900: #101828;
  --success-50: #ecfdf3;
  --success-600: #039855;
  --error-50: #fef3f2;
  --error-600: #d92d20;
  --warning-50: #fffaeb;
  --warning-600: #dc6803;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.1), 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
  color: var(--gray-800);
  background: var(--gray-50);
  font-family: var(--font-outfit);
}

body {
  color: var(--gray-800);
  background: var(--gray-50);
  font-family: var(--font-outfit);
}

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

.app-shell {
  grid-template-columns: 290px minmax(0, 1fr);
  background: var(--gray-50);
}

.whatsapp-test-mode-alert {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 80;
  transform: translateX(-50%);
  display: grid;
  gap: 3px;
  width: min(680px, calc(100vw - 32px));
  padding: 12px 18px;
  color: #8f1d12;
  border: 1px solid #ffb8b0;
  border-radius: 14px;
  background: #fff0ee;
  box-shadow: 0 14px 38px rgba(143, 29, 18, 0.16);
  text-align: center;
}

.whatsapp-test-mode-alert strong {
  font-size: 14px;
  font-weight: 900;
}

.whatsapp-test-mode-alert span {
  font-size: 12px;
  font-weight: 800;
  color: #a93a2f;
}

.campaign-single-contact-alert {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 81;
  transform: translateX(-50%);
  display: grid;
  gap: 4px;
  width: min(760px, calc(100vw - 32px));
  padding: 13px 18px;
  color: #7a1010;
  border: 1px solid #f04438;
  border-radius: 14px;
  background: #fef3f2;
  box-shadow: 0 16px 42px rgba(217, 45, 32, 0.2);
  text-align: center;
}

.campaign-single-contact-alert.stacked {
  bottom: 92px;
}

.campaign-single-contact-alert strong {
  font-size: 14px;
  font-weight: 950;
}

.campaign-single-contact-alert span {
  color: #b42318;
  font-size: 12px;
  font-weight: 850;
}

.app-shell.navigation-hidden {
  display: block;
}

.app-shell.navigation-hidden .content {
  min-height: 100vh;
  padding: 24px;
  overflow: visible;
}

.chat-page {
  position: relative;
  height: calc(100vh - 48px);
  min-height: 620px;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.chat-list-panel {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--gray-200);
  background: #ffffff;
}

.chat-conversation-overlay,
.chat-mobile-list-button,
.chat-welcome-list-button {
  display: none;
}

.chat-list-toolbar,
.chat-conversation-header,
.chat-compose {
  display: flex;
  align-items: center;
}

.chat-list-toolbar {
  gap: 14px;
  min-height: 76px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.chat-list-toolbar .chat-new-send-button {
  min-height: 42px;
  margin-left: auto;
  padding: 0 12px;
  white-space: nowrap;
}

.chat-list-toolbar .chat-sound-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  color: var(--gray-600);
  background: #ffffff;
  border-color: var(--gray-300);
}

.chat-list-toolbar .chat-sound-button.active {
  color: var(--brand-600);
  border-color: var(--brand-500);
  background: var(--brand-50);
}

.chat-list-toolbar strong {
  color: var(--gray-900);
  font-size: 24px;
  font-weight: 800;
}

.chat-back-button {
  min-height: 42px;
  padding: 0 14px;
  color: var(--gray-700);
  border-color: var(--gray-300);
  box-shadow: none;
}

.chat-list-controls {
  flex: 0 0 auto;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--gray-100);
  background: #ffffff;
}

.chat-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0 14px;
  min-height: 46px;
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: #ffffff;
}

.chat-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--gray-800);
  background: transparent;
  font-weight: 600;
}

.chat-init-phone-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 0;
}

.chat-init-phone-filter span {
  color: var(--gray-500);
  font-size: 0.78rem;
  font-weight: 700;
}

.chat-init-phone-filter select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  color: var(--gray-800);
  background: #ffffff;
  font-weight: 700;
  outline: 0;
}

.chat-init-phone-filter select:focus {
  border-color: var(--brand-300);
  box-shadow: 0 0 0 3px rgba(93, 135, 255, 0.14);
}

.chat-delivery-filter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--gray-50);
}

.chat-delivery-filter button {
  min-width: 0;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  color: var(--gray-700);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.chat-delivery-filter button:hover {
  color: var(--brand-600);
  background: #ffffff;
}

.chat-delivery-filter button.active {
  color: var(--brand-600);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.chat-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chat-list-load-trigger {
  height: 1px;
}

.chat-list-pagination-status {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 16px;
  color: var(--gray-500);
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.chat-list-pagination-status--loading::before {
  content: "";
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid var(--gray-300);
  border-top-color: var(--brand-500);
  border-radius: 50%;
  animation: chat-list-loading-spin 0.7s linear infinite;
}

@keyframes chat-list-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.chat-history-load-more,
.chat-history-complete {
  display: flex;
  justify-content: center;
  padding: 12px 16px 4px;
}

.chat-history-load-more button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 15px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  color: var(--brand-600);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  font-size: 0.8rem;
  font-weight: 800;
}

.chat-history-load-more button:hover:not(:disabled) {
  border-color: var(--brand-400);
  background: var(--brand-50);
}

.chat-history-load-more button:disabled {
  color: var(--gray-500);
  cursor: wait;
  opacity: 0.8;
}

.chat-history-complete {
  color: var(--gray-500);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
}

.chat-list-item {
  width: 100%;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--gray-100);
  background: #ffffff;
  text-align: left;
}

.chat-list-item.moved {
  animation: chat-list-move-highlight 0.9s ease both;
}

.chat-list-item:hover,
.chat-list-item.active {
  background: #f0f7f4;
}

@keyframes chat-list-move-highlight {
  0% {
    transform: translateY(14px);
    background: #eef4ff;
    box-shadow: inset 4px 0 0 #465fff;
  }

  45% {
    transform: translateY(0);
    background: #eef4ff;
    box-shadow: inset 4px 0 0 #465fff;
  }

  100% {
    transform: translateY(0);
    box-shadow: inset 0 0 0 transparent;
  }
}

.chat-list-item.tag-red {
  background: #fff7f7;
}

.chat-list-item.tag-red.active,
.chat-list-item.tag-red:hover {
  background: #fff0f0;
}

.chat-list-item.tag-yellow {
  background: #fffbeb;
}

.chat-list-item.tag-yellow.active,
.chat-list-item.tag-yellow:hover {
  background: #fff7d6;
}

.chat-list-item.tag-green {
  background: #ecfdf3;
}

.chat-list-item.tag-green.active,
.chat-list-item.tag-green:hover {
  background: #dff8ea;
}

.chat-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f8f64, #465fff);
  font-weight: 800;
}

.chat-conversation-header .chat-avatar,
.chat-list-item .chat-avatar {
  color: #ffffff;
}

.chat-avatar.large {
  width: 52px;
  height: 52px;
  font-size: 20px;
}

.chat-list-text {
  min-width: 0;
}

.chat-list-text strong,
.chat-list-text small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list-text strong {
  color: var(--gray-900);
  font-size: 15px;
  font-weight: 800;
}

.chat-list-text small,
.chat-list-item time,
.chat-conversation-header span {
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 600;
}

.chat-list-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 94px;
}

.chat-list-meta time {
  display: block;
  max-width: 96px;
  text-align: right;
  white-space: normal;
  line-height: 1.2;
}

.chat-list-meta b {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: #d92d20;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.14);
}

.chat-list-meta b.red {
  background: #d92d20;
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.14);
}

.chat-list-meta b.yellow {
  background: #f79009;
  box-shadow: 0 0 0 4px rgba(247, 144, 9, 0.18);
}

.chat-list-meta b.green {
  background: #039855;
  box-shadow: 0 0 0 4px rgba(3, 152, 85, 0.16);
}

.chat-unread-indicator {
  display: grid;
  justify-items: center;
  gap: 4px;
  line-height: 1;
}

.chat-unread-indicator i {
  width: 10px;
  height: 10px;
  display: block;
  border-radius: 999px;
  background: #0fbd6f;
  box-shadow: 0 0 0 4px rgba(15, 189, 111, 0.16);
}

.chat-unread-indicator small {
  color: #039855;
  font-size: 11px;
  font-weight: 900;
}

.chat-conversation-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 14px 14px, rgba(52, 64, 84, 0.08) 2px, transparent 3px) 0 0 / 34px 34px,
    linear-gradient(180deg, #eef4f1 0%, #f7f8fa 100%);
}

.chat-conversation-header {
  gap: 14px;
  min-height: 76px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--gray-200);
  background: #ffffff;
}

.chat-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.chat-observation-button {
  min-height: 38px;
  padding: 0 12px;
  color: var(--gray-700);
  border-color: var(--gray-300);
  box-shadow: none;
}

.chat-tag-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: var(--gray-50);
}

.chat-tag-option {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--gray-300);
}

.chat-tag-option.red {
  background: #d92d20;
}

.chat-tag-option.yellow {
  background: #f79009;
}

.chat-tag-option.green {
  background: #039855;
}

.chat-tag-option.active {
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.24);
}

.chat-conversation-header strong {
  display: block;
  color: var(--gray-900);
  font-size: 18px;
  font-weight: 800;
}

.chat-conversation-body {
  position: relative;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  overflow-y: auto;
}

.chat-bubble-row {
  display: flex;
}

.chat-bubble-row.has-reaction {
  margin-bottom: 14px;
}

.chat-bubble-row.incoming {
  justify-content: flex-start;
}

.chat-bubble-row.outgoing {
  justify-content: flex-end;
}

.chat-bubble {
  position: relative;
  width: fit-content;
  max-width: min(560px, 72%);
  padding: 12px 14px 8px;
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  color: var(--gray-900);
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.chat-bubble-row.outgoing .chat-bubble {
  border-color: #465fff;
  background: #465fff;
  color: #ffffff;
}

.chat-message-author {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  padding-right: 18px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.chat-bubble-row.outgoing .chat-bubble span {
  color: rgba(255, 255, 255, 0.74);
}

.chat-bubble-row.outgoing .chat-bubble span svg {
  color: rgba(255, 255, 255, 0.88);
}

.chat-bubble-row.outgoing .chat-bubble span svg.delivery-icon.read {
  color: #7dffb2;
}

.chat-bubble.status {
  border-color: #b7e9d2;
  background: #dff7eb;
}

.chat-bubble.pending {
  opacity: 0.78;
}

.chat-bubble.failed {
  border-color: #fda29b;
  background: #fff1f0;
  color: #b42318;
}

.chat-bubble-row.outgoing .chat-bubble.failed {
  border-color: #fda29b;
  background: #fff1f0;
  color: #b42318;
}

.chat-bubble.failed span {
  color: #d92d20;
}

.chat-bubble-row.outgoing .chat-bubble.failed span {
  color: #d92d20;
}

.chat-bubble.new-message {
  animation: chat-new-message-highlight 1.25s ease both;
}

.chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
}

.chat-message-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
}

.chat-bubble-row.outgoing .chat-message-actions {
  right: auto;
  left: 4px;
}

.chat-message-menu-button {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: var(--gray-500);
  background: rgba(255, 255, 255, 0.86);
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.16s ease, background 0.16s ease;
}

.chat-bubble:hover .chat-message-menu-button,
.chat-message-menu-button:focus-visible {
  opacity: 1;
}

.chat-bubble-row.outgoing .chat-message-menu-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.chat-message-menu {
  position: absolute;
  top: 30px;
  left: 0;
  min-width: 188px;
  padding: 6px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  z-index: 20;
}

.chat-bubble-row.outgoing .chat-message-menu {
  right: 0;
  left: auto;
}

.chat-message-menu button {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  color: var(--gray-700);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.chat-message-menu button:hover {
  color: var(--brand-600);
  background: var(--brand-50);
}

.chat-image-message {
  display: grid;
  gap: 8px;
}

.chat-image-message img {
  display: block;
  width: min(320px, 62vw);
  max-height: 420px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(16, 24, 40, 0.08);
}

.chat-image-preview-button {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
}

.chat-image-preview-button > span {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(16, 24, 40, 0.42);
  opacity: 0;
  transition: opacity 0.16s ease, background 0.16s ease;
}

.chat-image-preview-button:hover > span,
.chat-image-preview-button:focus-visible > span {
  opacity: 1;
}

.chat-image-preview-button:hover > span {
  background: rgba(16, 24, 40, 0.62);
}

.chat-image-lightbox-backdrop {
  position: fixed;
  inset: 24px 24px 24px 384px;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 24, 40, 0.64);
  backdrop-filter: blur(4px);
}

.chat-image-lightbox {
  width: min(920px, 100%);
  max-height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

.chat-image-lightbox header {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--gray-200);
}

.chat-image-lightbox header strong {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-image-lightbox header div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-image-lightbox header .icon-button {
  width: 40px;
  height: 40px;
  color: var(--gray-700);
  text-decoration: none;
}

.chat-image-lightbox > div {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: auto;
  background: var(--gray-50);
}

.chat-image-lightbox > div img {
  max-width: 100%;
  max-height: calc(100vh - 210px);
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
}

.chat-image-message small {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 800;
}

.chat-bubble-row.outgoing .chat-image-message small {
  color: rgba(255, 255, 255, 0.74);
}

.chat-image-error {
  color: #b42318 !important;
}

.chat-document-message {
  display: grid;
  gap: 8px;
}

.chat-document-message > small {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 800;
}

.chat-bubble-row.outgoing .chat-document-message > small {
  color: rgba(255, 255, 255, 0.74);
}

.chat-document-preview-button {
  position: relative;
  width: min(320px, 62vw);
  height: 420px;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  cursor: zoom-in;
}

.chat-document-preview-button iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.chat-document-preview-button > span {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(16, 24, 40, 0.42);
  opacity: 0;
  transition: opacity 0.16s ease, background 0.16s ease;
}

.chat-document-preview-button:hover > span,
.chat-document-preview-button:focus-visible > span {
  opacity: 1;
}

.chat-document-download-card {
  width: min(360px, 70vw);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  color: var(--gray-900);
  background: #ffffff;
}

.chat-document-download-card strong {
  display: block;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-document-download-card small {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 700;
}

.chat-document-download-card a {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  color: var(--brand-600);
  background: var(--brand-50);
}

.chat-document-lightbox > div iframe {
  width: min(900px, 100%);
  height: calc(100vh - 210px);
  min-height: 420px;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
}

.chat-audio-message {
  width: min(340px, 70vw);
  display: grid;
  gap: 10px;
}

.chat-audio-message > small {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 800;
}

.chat-bubble-row.outgoing .chat-audio-message > small {
  color: rgba(255, 255, 255, 0.74);
}

.chat-audio-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-800);
}

.chat-bubble-row.outgoing .chat-audio-title {
  color: #ffffff;
}

.chat-audio-title strong {
  font-size: 13px;
  font-weight: 900;
}

.chat-audio-message audio {
  width: 100%;
  height: 38px;
  display: block;
}

.chat-message-reaction {
  position: absolute;
  right: 10px;
  bottom: -17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  font-size: 15px;
  line-height: 1;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.chat-bubble-row.outgoing .chat-message-reaction {
  right: auto;
  left: 10px;
  color: var(--gray-900);
}

.chat-template-label {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #465fff;
  background: #eef4ff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chat-template-header {
  display: block;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(102, 112, 133, 0.18);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
}

.chat-bubble-row.outgoing .chat-template-header {
  border-bottom-color: rgba(255, 255, 255, 0.22);
}

.chat-bubble-row.outgoing .chat-template-label {
  color: #465fff;
  background: #ffffff;
}

.chat-template-buttons {
  display: grid;
  gap: 1px;
  margin: 12px -14px -8px;
  border-top: 1px solid rgba(102, 112, 133, 0.18);
}

.chat-template-buttons span {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 11px 14px;
  color: #465fff;
  background: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.chat-bubble-row.outgoing .chat-template-buttons {
  border-top-color: rgba(255, 255, 255, 0.24);
}

.chat-bubble-row.outgoing .chat-template-buttons span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.chat-bubble span {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 10px;
  color: var(--gray-400);
  font-size: 12px;
  font-weight: 700;
}

.chat-bubble-failed-message {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
  color: #b42318;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.chat-bubble-failed-message b {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.82;
}

.chat-bubble span svg {
  color: var(--gray-400);
}

.chat-bubble span svg.delivery-icon.read {
  color: #12b76a;
}

.chat-bubble-row.outgoing .chat-bubble:not(.failed),
.chat-bubble-row.outgoing .chat-bubble:not(.failed) p,
.chat-bubble-row.outgoing .chat-bubble:not(.failed) .chat-template-header {
  color: #ffffff;
}

.chat-bubble-row.outgoing .chat-bubble:not(.failed) > span,
.chat-bubble-row.outgoing .chat-bubble:not(.failed) > span svg {
  color: rgba(255, 255, 255, 0.88);
}

.chat-bubble-row.outgoing .chat-bubble:not(.failed) > span svg.delivery-icon.read {
  color: #7dffb2;
}

.chat-history-status-modal {
  position: relative;
  inset: auto;
  display: grid;
  width: min(460px, calc(100vw - 32px));
  height: auto;
  max-height: min(680px, calc(100vh - 48px));
  margin: 0;
  overflow: hidden;
}

.modal-backdrop.chat-history-status-backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 35;
  padding: 24px;
}

.chat-history-status-modal .modal-header p {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-history-status-body {
  display: grid;
  gap: 12px;
}

.chat-history-status-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chat-history-status-list li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}

.chat-history-status-list li:last-child {
  border-bottom: 0;
}

.chat-history-status-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--gray-400);
}

.chat-history-status-dot.sent {
  background: var(--brand-500);
}

.chat-history-status-dot.delivered {
  background: #12b76a;
}

.chat-history-status-dot.read {
  background: #0ba5ec;
}

.chat-history-status-dot.failed {
  background: #f04438;
}

.chat-history-status-list strong {
  display: block;
  color: var(--gray-900);
  font-size: 14px;
  font-weight: 900;
  text-transform: capitalize;
}

.chat-history-status-list em {
  display: block;
  margin-top: 2px;
  color: var(--gray-400);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.chat-history-status-list small {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 700;
}

@keyframes chat-new-message-highlight {
  0% {
    transform: translateX(0);
    border-color: #0fbd6f;
    box-shadow: 0 0 0 0 rgba(15, 189, 111, 0.28), var(--shadow-xs);
  }

  18% {
    transform: translateX(7px);
  }

  34% {
    transform: translateX(-5px);
  }

  50% {
    transform: translateX(3px);
    background: #ecfdf3;
    box-shadow: 0 0 0 5px rgba(15, 189, 111, 0.16), var(--shadow-sm);
  }

  100% {
    transform: translateX(0);
    border-color: var(--gray-100);
    background: #ffffff;
    box-shadow: var(--shadow-xs);
  }
}

.chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--gray-200);
  background: #f2f4f7;
}

.chat-conversation-window {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: #ffffff;
  color: #243247;
  font-size: 13px;
  font-weight: 800;
}

.chat-window-info-button {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.chat-conversation-window.active {
  color: #015c38;
  border-color: #abefc6;
  background: #ecfdf3;
}

.chat-conversation-window.expired {
  color: #8f1a12;
  border-color: #fecdca;
  background: #fef3f2;
}

.chat-conversation-window.empty {
  color: #243247;
  border-color: var(--gray-200);
  background: #ffffff;
}

.chat-encryption-notice {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 980px;
  color: #243247;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.chat-encryption-notice svg {
  flex: 0 0 auto;
  color: #12b76a;
}

.chat-conversation-window span,
.chat-conversation-window.expired span,
.chat-conversation-window.active span,
.chat-conversation-window.empty span,
.chat-window-info-button,
.chat-encryption-notice span {
  color: #111827 !important;
  opacity: 1;
  font-weight: 800;
}

.chat-compose .variable-textarea-wrap {
  width: 100%;
  min-width: 0;
}

.chat-compose-input-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.chat-compose-error {
  grid-column: 1 / -1;
  padding: 10px 12px;
  color: #b42318;
  border: 1px solid #fecdca;
  border-radius: 8px;
  background: #fef3f2;
  font-size: 13px;
  font-weight: 800;
}

.chat-compose-phone-blocked {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  color: #344054;
  border: 1px solid #fedf89;
  border-radius: 8px;
  background: #fffaeb;
  font-size: 13px;
  line-height: 1.45;
}

.chat-compose-phone-blocked svg {
  flex: 0 0 auto;
  margin-top: 1px;
  color: #b54708;
}

.chat-compose-phone-blocked strong,
.chat-compose-phone-blocked span {
  display: block;
}

.chat-compose-phone-blocked strong {
  margin-bottom: 3px;
  color: #101828;
  font-size: 14px;
  font-weight: 900;
}

.chat-compose-phone-blocked-link {
  color: #5d87ff;
  font-weight: 800;
  text-decoration: none;
}

.chat-compose-phone-blocked-link:hover {
  text-decoration: underline;
}

.chat-window-new-send {
  width: fit-content;
  min-width: 170px;
}

.chat-compose .variable-textarea-editor {
  min-height: 160px;
  height: 160px;
  max-height: 240px;
  padding: 16px 54px 16px 18px;
  border-radius: 8px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.35;
}

.chat-compose .variable-textarea-variables {
  margin-top: 8px;
}

.chat-compose-actions {
  display: grid;
  grid-template-rows: repeat(3, 48px);
  gap: 8px;
  align-content: end;
  justify-items: center;
}

.chat-compose-action-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.chat-compose-action-button:hover:not(:disabled) {
  color: var(--brand-700);
  border-color: var(--brand-200);
  background: var(--brand-50);
  transform: translateY(-1px);
}

.chat-compose-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.chat-compose-action-button.send {
  width: 48px;
  height: 48px;
  color: var(--gray-500);
}

.chat-compose-action-button.media {
  width: 42px;
  height: 42px;
  color: var(--gray-600);
}

@media (max-width: 640px) {
  .chat-compose-input-row {
    grid-template-columns: minmax(0, 1fr) 50px;
    gap: 8px;
  }

  .chat-compose-actions {
    grid-template-rows: repeat(3, 42px);
    gap: 6px;
  }

  .chat-compose .variable-textarea-editor {
    min-height: 138px;
    height: 138px;
  }

  .chat-compose-action-button.send {
    width: 44px;
    height: 44px;
  }

  .chat-compose-action-button.media {
    width: 38px;
    height: 38px;
  }
}

.chat-media-confirm-modal,
.chat-audio-record-modal {
  width: min(560px, calc(100vw - 32px));
  text-align: center;
}

.chat-media-confirm-modal .modal-header,
.chat-audio-record-modal .modal-header {
  justify-content: center;
  text-align: center;
  position: relative;
}

.chat-media-confirm-modal .modal-header .icon-button,
.chat-audio-record-modal .modal-header .icon-button {
  position: absolute;
  top: 14px;
  right: 14px;
}

.chat-media-confirm-body,
.chat-audio-record-body {
  display: grid;
  gap: 14px;
  place-items: center;
  text-align: center;
}

.chat-media-confirm-body img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--gray-50);
  margin: 0 auto;
}

.chat-media-confirm-body textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  color: var(--gray-900);
  font: inherit;
}

.chat-media-file-preview {
  display: grid;
  gap: 8px;
  place-items: center;
  padding: 26px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  color: var(--gray-700);
  background: var(--gray-50);
  text-align: center;
}

.chat-media-file-preview strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-media-file-preview small {
  color: var(--gray-500);
  font-weight: 700;
}

.chat-audio-record-body audio {
  width: 100%;
}

.chat-audio-record-body .button {
  width: fit-content;
  height: 20px;
}

.chat-empty,
.chat-error,
.chat-welcome {
  color: var(--gray-500);
  font-weight: 700;
}

.chat-empty,
.chat-error {
  padding: 18px 16px;
}

.chat-error {
  margin: 0 16px 12px;
  color: var(--error-600);
  border: 1px solid #fecdca;
  border-radius: 8px;
  background: var(--error-50);
}

.chat-welcome {
  position: relative;
  min-height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
}

.chat-welcome svg {
  color: var(--brand-500);
}

.chat-welcome strong {
  color: var(--gray-900);
  font-size: 24px;
}

.chat-welcome .chat-welcome-campaign-notice {
  width: 100%;
  max-width: 620px;
  margin: 12px 0 0;
  text-align: left;
  font-size: 14px;
  line-height: 1.6;
}

.chat-welcome .chat-welcome-campaign-notice strong {
  color: inherit;
  font-size: inherit;
}

.chat-send-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1420px, calc(100vw - 48px));
  height: auto;
  min-height: 0;
  max-height: calc(100vh - 48px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  z-index: 121;
}

.chat-window-info-modal {
  width: min(560px, calc(100vw - 32px));
  text-align: center;
}

.chat-window-info-modal .modal-header {
  justify-content: center;
  text-align: center;
  position: relative;
}

.chat-window-info-modal .modal-header .icon-button {
  position: absolute;
  top: 14px;
  right: 14px;
}

.chat-window-info-body {
  display: grid;
  gap: 14px;
  text-align: center;
  justify-items: center;
}

.chat-window-info-body p {
  margin: 0;
  color: var(--gray-600);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 700;
  max-width: 480px;
}

.chat-send-modal-body {
  min-height: 0;
  padding: 24px;
  max-height: calc(100vh - 184px);
  overflow-y: auto;
  background: #ffffff;
}

.chat-send-contact-field {
  max-width: 520px;
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.chat-send-contact-field input {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  color: var(--gray-900);
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  background: #ffffff;
  font-size: 16px;
  font-weight: 700;
  outline: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.chat-send-contact-field input:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(70, 95, 255, 0.16);
}

.chat-send-contact-field input:disabled {
  color: var(--gray-600);
  background: var(--gray-50);
  cursor: not-allowed;
}

.chat-send-modal-body .campaign-template-step {
  min-height: 0;
  align-items: start;
}

.chat-send-modal-body .campaign-template-fields > .mt-3 {
  max-width: 760px;
}

.app-modal-backdrop .campaign-template-step {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  min-height: 0;
}

.app-modal-backdrop .campaign-template-preview {
  position: sticky;
  top: 0;
}

.chat-send-modal-footer {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 18px 24px;
  border-top: 1px solid var(--gray-100);
  background: #ffffff;
}

.chat-send-feedback {
  margin-right: auto;
  font-weight: 800;
}

.chat-send-feedback.error {
  color: var(--error-600);
}

.chat-send-feedback.success {
  color: var(--success-600);
}

.chat-observation-modal {
  width: min(720px, calc(100vw - 48px));
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.chat-observation-modal-body {
  display: grid;
  gap: 12px;
  padding: 24px;
  background: #ffffff;
}

.chat-observation-modal-body .variable-textarea-editor {
  min-height: 220px;
}

.sidebar {
  z-index: 60;
  padding: 28px 20px;
  color: var(--gray-700);
  border-right: 1px solid var(--gray-200);
  background: #ffffff;
  box-shadow: none;
}

.brand {
  gap: 12px;
  padding: 0 8px 28px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  color: #ffffff;
  border-radius: 12px;
  background: var(--brand-500);
  box-shadow: 0 10px 20px rgba(70, 95, 255, 0.18);
}

.brand-mark svg,
.auth-brand .brand-mark svg {
  color: #ffffff;
  stroke: #ffffff;
}

.brand strong,
.sidebar-footer strong {
  color: var(--gray-900);
  font-size: 16px;
  font-weight: 700;
}

.brand span,
.sidebar-footer span {
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 500;
}

.nav-menu {
  gap: 4px;
}

.nav-menu::before {
  content: "MENU";
  display: block;
  margin: 6px 12px 12px;
  color: var(--gray-400);
  font-size: 12px;
  font-weight: 700;
}

.nav-item,
.nav-subitem {
  min-height: 44px;
  color: var(--gray-700);
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.16s ease, background 0.16s ease;
}

.nav-item {
  padding: 12px 14px;
}

.nav-item:hover,
.nav-item.active,
.nav-subitem:hover,
.nav-subitem.active {
  color: var(--brand-500);
  background: var(--brand-50);
}

.nav-item svg,
.nav-subitem svg {
  color: var(--gray-500);
  stroke: currentColor;
}

.nav-item.active svg,
.nav-subitem.active svg,
.nav-item:hover svg,
.nav-subitem:hover svg {
  color: #ffffff;
  stroke: #ffffff;
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff;
  background: var(--brand-500);
}

.nav-subitem:hover,
.nav-subitem.active {
  color: #ffffff;
  background: var(--brand-500);
}

.nav-submenu {
  gap: 4px;
  padding: 6px 0 8px 36px;
}

.nav-subitem {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-left: 0;
}

.nav-chevron {
  color: var(--gray-400);
}

.sidebar-footer {
  padding: 14px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  background: var(--gray-25);
}

.sidebar-logout,
.icon-button {
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.sidebar-logout:hover,
.icon-button:hover {
  color: var(--gray-700);
  background: var(--gray-50);
}

.avatar {
  color: var(--brand-600);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  font-weight: 700;
}

.content {
  min-width: 0;
  padding: 0;
  overflow: visible;
  background: var(--gray-50);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 73px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--gray-200);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.topbar:empty {
  justify-content: flex-end;
}

.topbar-menu {
  width: 44px;
  height: 44px;
  display: none;
  place-items: center;
  border-radius: 10px;
}

.topbar-notifications {
  position: relative;
  margin-left: auto;
}

.topbar-notification-button {
  position: relative;
  width: 44px;
  height: 44px;
}

.topbar-notification-button.has-unread {
  color: var(--brand-500);
  border-color: var(--brand-100);
  background: var(--brand-50);
}

.topbar-notification-button > span {
  position: absolute;
  right: -4px;
  top: -5px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #d92d20;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.topbar-notification-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

.topbar-notification-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
}

.topbar-notification-header > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.topbar-notification-header strong {
  display: block;
  color: var(--gray-900);
  font-size: 15px;
  font-weight: 800;
}

.topbar-notification-header small {
  display: block;
}

.topbar-notification-clear {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--brand-600);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.topbar-notification-clear:hover {
  color: var(--brand-700);
}

.topbar-notification-header small,
.topbar-notification-empty,
.topbar-notification-list button small,
.topbar-notification-list button time {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 700;
}

.topbar-notification-list {
  max-height: 360px;
  overflow-y: auto;
}

.topbar-notification-empty {
  padding: 16px;
}

.topbar-notification-list button {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid var(--gray-100);
  background: #ffffff;
  text-align: left;
}

.topbar-notification-list button:hover {
  background: var(--brand-50);
}

.topbar-notification-list button.viewed {
  opacity: 0.72;
}

.topbar-notification-list button:last-child {
  border-bottom: 0;
}

.topbar-notification-list button strong {
  display: block;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-notification-list button small {
  display: block;
  margin-top: 2px;
}

.topbar-notification-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #0fbd6f;
  box-shadow: 0 0 0 4px rgba(15, 189, 111, 0.16);
}

.topbar-search {
  width: min(430px, 45vw);
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--gray-400);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
  font-size: 14px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.topbar-user-text {
  display: grid;
  gap: 1px;
}

.topbar-user-text strong {
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 700;
}

.topbar-user-text span {
  max-width: 220px;
  overflow: hidden;
  color: var(--gray-500);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-header,
.page-stack {
  width: min(100%, 1536px);
  margin-inline: auto;
}

.page-header {
  padding: 26px 24px 10px;
}

.page-header h1 {
  margin: 0;
  color: var(--gray-900);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.page-header p {
  margin: 6px 0 0;
  color: var(--gray-500);
  font-size: 14px;
  font-weight: 500;
}

.page-stack {
  gap: 20px;
  padding: 14px 24px 32px;
}

.panel,
.metric-card,
.stat-card,
.metadata-card,
.detail-section,
.campaign-create-main,
.campaign-preview,
.campaign-items-section,
.config-card,
.process-summary-card {
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.panel {
  overflow: hidden;
}

.admin-filter-panel {
  position: relative;
  z-index: 2147482000;
  overflow: visible;
}

.admin-filter-panel + .stats-grid,
.admin-filter-panel ~ .panel {
  position: relative;
  z-index: 1;
}

.panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
  background: #ffffff;
}

.panel-header h2,
.campaign-items-header h1,
.campaign-create-header h1,
.modal-header h2,
.details-title-block h2 {
  color: var(--gray-900);
  font-size: 18px;
  font-weight: 700;
}

.panel-header p,
.campaign-items-header p,
.campaign-create-header p,
.modal-header p,
.details-title-block p {
  color: var(--gray-500);
  font-size: 14px;
  font-weight: 500;
}

.table-wrap {
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

table {
  min-width: 100%;
  border-collapse: collapse;
}

thead tr {
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
  background: #ffffff;
}

th {
  padding: 12px 20px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

td {
  padding: 14px 20px;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
  font-weight: 500;
}

td strong {
  color: var(--gray-800);
  font-weight: 700;
}

td span {
  color: var(--gray-500);
}

.campaign-list-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-create-menu {
  position: relative;
}

.campaign-create-menu-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: var(--shadow-theme-lg);
}

.campaign-create-menu-options button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: #ffffff;
  color: var(--gray-700);
  cursor: pointer;
  font: inherit;
  padding: 10px 12px;
  text-align: left;
}

.campaign-create-menu-options button:hover {
  background: var(--gray-50);
}

.campaign-status-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-top: 0;
}

.campaign-status-indicator span {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-top: 0;
  border-radius: 999px;
  background: var(--gray-400);
  box-shadow: 0 0 0 4px rgba(102, 112, 133, 0.12);
}

.campaign-status-indicator.success span {
  background: #008a4c;
  box-shadow: 0 0 0 4px rgba(0, 138, 76, 0.2);
}

.campaign-status-indicator.danger span {
  background: #d11f1f;
  box-shadow: 0 0 0 4px rgba(209, 31, 31, 0.2);
}

tbody tr:hover {
  background: var(--gray-25);
}

.button {
  min-height: 40px;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.button-primary {
  color: #ffffff;
  border: 1px solid var(--brand-500);
  background: var(--brand-500);
}

.button-primary:hover:not(:disabled) {
  border-color: var(--brand-600);
  background: var(--brand-600);
}

.button-outline,
.button-light,
.metadata-see-all {
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  background: #ffffff;
}

.button-outline:hover:not(:disabled),
.button-light:hover:not(:disabled),
.metadata-see-all:hover:not(:disabled) {
  color: var(--gray-800);
  background: var(--gray-50);
}

.button-danger {
  color: #ffffff;
  border: 1px solid var(--error-600);
  background: var(--error-600);
}

.button-danger:hover:not(:disabled) {
  border-color: #b42318;
  background: #b42318;
}

.metadata-see-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.metadata-see-all.danger {
  color: var(--error-600);
  border-color: #fecdca;
  background: #ffffff;
}

.metadata-see-all.danger:hover {
  background: var(--error-50);
}

.pagination {
  justify-content: flex-end;
  gap: 10px;
  padding: 0;
}

.page-pill {
  min-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--brand-600);
  border: 1px solid var(--brand-100);
  border-radius: 10px;
  background: var(--brand-50);
  font-size: 14px;
  font-weight: 700;
}

.alert,
.notice,
.success-notice {
  position: relative;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  box-shadow: none;
  margin-top: 20px
}

.alert::before,
.notice::before,
.success-notice::before {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  margin-top: -2px;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.alert {
  color: var(--gray-500);
  border: 1px solid #f04438;
  background: #fef3f2;
}

.alert::before {
  content: "!";
  color: #f04438;
}

.notice {
  color: var(--gray-500);
  border: 1px solid #f79009;
  background: #fffaeb;
}

.notice::before {
  content: "i";
  color: #f79009;
  font-family: Georgia, serif;
  font-style: italic;
}

.success-notice {
  color: var(--gray-500);
  border: 1px solid #12b76a;
  background: #ecfdf3;
}

.success-notice::before {
  content: "✓";
  color: #12b76a;
}

.notice.success-notice {
  color: var(--gray-500);
  border-color: #12b76a;
  background: #ecfdf3;
}

.notice.success-notice::before {
  color: #12b76a;
  font-family: var(--font-outfit);
  font-style: normal;
}

.loading,
.empty-state {
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
}

.empty-state {
  color: var(--gray-500);
  border: 1px dashed var(--gray-300);
  background: var(--gray-25);
}

label {
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 600;
}

.field-label-copy {
  display: grid;
  gap: 4px;
  width: 100%;
  color: var(--gray-700);
  line-height: 1.35;
}

.field-label-copy > span,
.field-label-copy small {
  display: block;
}

.field-label-copy small {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.date-range-field-label > .field-label-copy {
  display: grid;
}

input,
select,
textarea,
.custom-select-trigger,
.range-inputs input {
  min-height: 44px;
  color: var(--gray-800);
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

input:focus,
select:focus,
textarea:focus,
.auth-field:focus-within,
.custom-select.open .custom-select-trigger,
.custom-select-trigger:focus-within {
  border-color: var(--brand-300);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(70, 95, 255, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}

.auth-field {
  height: 44px;
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.auth-field svg {
  color: var(--gray-400);
}

.auth-field input {
  min-height: 0;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-field input:focus {
  box-shadow: none;
}

.custom-select-menu,
.custom-select-dialog,
.filter-popup,
.modal,
.details-modal,
.list-popup {
  border-radius: 16px;
}

.custom-select-option {
  border-radius: 10px;
}

.custom-select-option:hover,
.custom-select-option.checked {
  background: var(--brand-50);
}

.custom-select-option.checked {
  color: var(--brand-600);
}

.custom-select-checkbox {
  border-color: var(--gray-300);
  border-radius: 6px;
}

.custom-select-option.checked .custom-select-checkbox {
  border-color: var(--brand-500);
  background: var(--brand-500);
}

.filter-popup-backdrop,
.modal-backdrop,
.details-backdrop,
.list-popup-backdrop,
.custom-select-dialog-backdrop {
  background: rgba(16, 24, 40, 0.52);
  backdrop-filter: blur(4px);
}

.filter-popup-backdrop,
.modal-backdrop,
.details-backdrop,
.list-popup-backdrop {
  z-index: 120;
}

.custom-select-dialog-backdrop {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483000;
}

.details-backdrop {
  z-index: 130;
}

.custom-select-menu {
  z-index: 2147483001;
}

.custom-select.open {
  position: relative;
  z-index: 2147483001;
}

.custom-select-field {
  position: relative;
  z-index: 1;
}

.custom-select-field.open {
  z-index: 2147483001;
}

.filter-popup-header,
.modal-header,
.list-popup-header {
  border-bottom: 1px solid var(--gray-100);
  background: #ffffff;
}

.filter-trigger-row {
  gap: 10px;
}

.filter-grid label,
.campaign-form-grid label,
.campaign-filter-grid label,
.config-form-grid label {
  display: grid;
  gap: 8px;
}

.campaign-form-grid .campaign-checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.campaign-checkbox-field input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand-600);
  box-shadow: none;
}

.campaign-checkbox-field input:focus {
  box-shadow: none;
}

.filter-popup-actions,
.confirm-actions {
  border-top: 1px solid var(--gray-100);
  background: var(--gray-25);
}

.confirm-dialog-backdrop {
  z-index: 2147482000;
}

.confirm-icon.danger {
  color: var(--error-600);
  background: var(--error-50);
}

.confirm-icon.success {
  color: var(--success-600);
  background: var(--success-50);
}

.confirm-icon.info {
  color: var(--brand-600);
  background: var(--brand-50);
}

.auth-page {
  background:
    radial-gradient(circle at top left, rgba(70, 95, 255, 0.12), transparent 32rem),
    var(--gray-50);
}

.auth-panel {
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.auth-brand .brand-mark,
.auth-brand > div:first-child {
  color: #ffffff;
  background: var(--brand-500);
}

.auth-header h1 {
  color: var(--gray-900);
  font-size: 30px;
  font-weight: 700;
}

.auth-header p,
.auth-brand span {
  color: var(--gray-500);
}

.auth-switch button {
  color: var(--brand-600);
}

.campaign-create-page {
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-right: 414px;
}

.campaign-create-page .campaign-preview {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 20;
  width: 390px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.navigation-hidden .campaign-create-page {
  display: block;
  min-height: calc(100vh - 48px);
  padding-right: 430px;
  animation: campaign-page-enter 0.42s ease both;
}

.campaign-create-main {
  overflow: visible;
}

.campaign-preview {
  align-content: start;
  overflow: hidden;
}

.navigation-hidden .campaign-preview {
  align-content: start;
  animation: campaign-preview-enter 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.campaign-create-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
}

.campaign-items-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.campaign-items-header .button {
  grid-column: 1 / -1;
}

.campaign-items-estimate {
  justify-self: end;
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, auto));
  gap: 12px;
}

.campaign-items-estimate div {
  display: grid;
  gap: 4px;
  min-width: 150px;
  padding: 12px 14px;
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.campaign-items-estimate span {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 700;
}

.campaign-items-estimate strong {
  color: var(--gray-900);
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .campaign-items-header {
    grid-template-columns: 1fr;
  }

  .campaign-items-estimate {
    justify-self: stretch;
    grid-template-columns: 1fr;
  }
}

.campaign-items-toolbar {
  display: grid;
  gap: 12px;
  align-items: start;
}

.campaign-items-toast {
  position: fixed;
  top: 96px;
  right: 24px;
  z-index: 60;
  display: grid;
  gap: 4px;
  width: min(340px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid #86efac;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  box-shadow: 0 18px 40px rgba(22, 101, 52, 0.16);
  animation: campaign-toast-in 0.28s ease-out;
}

.campaign-items-toast strong {
  color: #14532d;
  font-size: 14px;
  font-weight: 800;
}

.campaign-items-toast span {
  color: #166534;
  font-size: 13px;
  font-weight: 700;
}

@keyframes campaign-toast-in {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.campaign-items-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.campaign-items-refreshing {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 14px;
  font-weight: 800;
}

.campaign-items-refreshing::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #2563eb;
  animation: campaign-refresh-dot 1s ease-in-out infinite;
}

.campaign-item-row-new {
  animation: campaign-row-inserted 0.58s ease-in-out;
}

@keyframes campaign-refresh-dot {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes campaign-row-inserted {
  0% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  50% {
    transform: translateX(5px);
  }

  75% {
    transform: translateX(-2px);
  }

  100% {
    transform: translateX(0);
  }
}

.campaign-items-status-filter,
.campaign-list-status-filter {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.campaign-list-status-filter {
  margin-bottom: 14px;
}

.campaign-items-status-filter span,
.campaign-list-status-filter strong {
  color: var(--gray-500);
  font-size: 14px;
  font-weight: 800;
}

.campaign-items-status-filter div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.campaign-items-status-filter button,
.campaign-list-status-filter button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  background: #ffffff;
  color: var(--gray-600);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.campaign-items-status-filter button:hover,
.campaign-items-status-filter button.active,
.campaign-list-status-filter button:hover,
.campaign-list-status-filter button.active {
  border-color: var(--brand-500);
  background: #eef2ff;
  color: var(--brand-500);
  box-shadow: var(--shadow-sm);
}

.campaign-items-toolbar .campaign-info-alert {
  width: 100%;
  max-width: none;
  margin: 0;
  color: #92400e;
  border-color: #f59e0b;
  background: #fffbeb;
}

.outscraper-page .panel {
  overflow: visible;
}

.outscraper-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 14px;
  align-items: end;
}

.outscraper-form label {
  display: grid;
  gap: 8px;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 800;
}

.outscraper-form input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  color: var(--gray-800);
  background: #ffffff;
  font: inherit;
  font-weight: 600;
}

.outscraper-form .button {
  min-height: 44px;
  white-space: nowrap;
}

.outscraper-result {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--brand-100);
  border-radius: 8px;
  background: #eef2ff;
}

.outscraper-result span {
  color: var(--brand-600);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.outscraper-result h2 {
  margin: 4px 0 0;
  color: var(--gray-900);
  font-size: 22px;
}

.outscraper-result dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.outscraper-result div {
  min-width: 0;
}

.outscraper-result dt {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 800;
}

.outscraper-result dd {
  margin: 4px 0 0;
  color: var(--gray-800);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.outscraper-payload-modal {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.outscraper-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.outscraper-detail-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  background: var(--gray-50);
}

.outscraper-detail-item dt {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 800;
}

.outscraper-detail-item dd {
  margin: 5px 0 0;
  color: var(--gray-800);
  font-weight: 700;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.campaign-items-toolbar .campaign-info-alert::before {
  color: #f59e0b;
}

.campaign-items-page .campaign-processing-notice {
  margin-left: 0;
  margin-right: 0;
}

.campaign-details-modal {
  width: min(1180px, calc(100vw - 36px));
}

.campaign-details-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
  align-items: start;
}

.campaign-details-body .campaign-preview {
  position: static;
  width: 100%;
  max-width: none;
  max-height: none;
}

.campaign-details-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.campaign-details-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.campaign-details-summary div {
  display: grid;
  gap: 6px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  background: #ffffff;
}

.campaign-details-summary span {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 700;
}

.campaign-details-summary strong {
  color: var(--gray-800);
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.campaign-details-template-preview {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.campaign-details-template-preview .whatsapp-template-preview {
  max-width: 580px;
}

.campaign-create-header .button,
.campaign-actions .button {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.campaign-create-header .button:hover:not(:disabled),
.campaign-actions .button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.campaign-processing-notice {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin: 0 24px;
  padding: 16px;
  color: var(--gray-500);
  border: 1px solid #0ba5ec;
  border-radius: 12px;
  background: #f0f9ff;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  animation: campaign-soft-enter 0.36s ease 0.08s both;
}

.campaign-processing-notice::before {
  content: "i";
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  margin-top: -2px;
  color: #0ba5ec;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-family: Georgia, serif;
  font-size: 14px;
  font-style: italic;
  font-weight: 800;
  line-height: 1;
}

.campaign-steps {
  padding: 20px 24px 0;
}

.campaign-mobile-step-status {
  display: none;
}

.campaign-step {
  color: var(--gray-500);
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: default;
  transition: color 0.22s ease;
}

.campaign-step.completed {
  cursor: pointer;
}

.campaign-step.locked {
  cursor: default;
}

.campaign-step span {
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
  background: #ffffff;
  transition: color 0.22s ease, background 0.22s ease, border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.campaign-step.active,
.campaign-step.completed {
  color: var(--brand-600);
}

.campaign-step.active span,
.campaign-step.completed span {
  color: #ffffff;
  background: var(--brand-500);
  border-color: var(--brand-500);
  box-shadow: 0 10px 20px rgba(70, 95, 255, 0.18);
  transform: translateY(-1px);
}

.campaign-step.active span {
  animation: campaign-step-pulse 0.42s ease both;
}

.campaign-step::before,
.campaign-step::after {
  background: var(--gray-200);
}

.campaign-step.completed::before,
.campaign-step.completed::after {
  background: var(--brand-300);
}

.campaign-step-content {
  position: relative;
  z-index: 30;
  padding: 22px 24px;
  overflow: visible;
}

.campaign-step-panel {
  animation: campaign-step-enter 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.campaign-step-panel[data-step="0"] {
  animation-name: campaign-first-step-enter;
}

.campaign-create-blocked-alert {
  margin: 18px 24px 0;
}

.campaign-date-step {
  display: grid;
  gap: 14px;
}

.campaign-date-empty-notice {
  margin: 0;
}

.campaign-template-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
  align-items: start;
}

.campaign-template-fields,
.campaign-template-preview {
  display: grid;
  gap: 14px;
}

.campaign-template-summary {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  background: var(--gray-25);
}

.campaign-template-summary span,
.campaign-template-summary small {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 700;
}

.campaign-template-summary strong {
  color: var(--gray-900);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.campaign-template-approval-alert {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  color: var(--error-600);
  border: 1px solid #fda29b;
  border-radius: 8px;
  background: #fff1f0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.campaign-template-approval-alert strong,
.campaign-template-approval-alert b {
  color: var(--error-600);
}

.campaign-template-approval-alert a {
  color: var(--error-600);
  font-weight: 700;
}

.campaign-template-parameter-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  background: #ffffff;
}

.campaign-template-parameter-group > div {
  display: grid;
  gap: 4px;
}

.campaign-template-parameter-group strong {
  color: var(--gray-900);
}

.campaign-template-parameter-group small {
  color: var(--gray-500);
  font-weight: 600;
  line-height: 1.5;
  white-space: pre-wrap;
}

.campaign-template-parameter-field {
  display: grid;
  gap: 8px;
}

.variable-textarea-wrap {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

.variable-textarea-editor-shell {
  position: relative;
}

.variable-textarea-editor {
  min-height: 190px;
  padding: 12px 14px;
  color: var(--gray-900);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 36, 65, 0.04);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  outline: 0;
  overflow: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.variable-textarea-emoji-button {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(15, 36, 65, 0.08);
  cursor: pointer;
}

.variable-textarea-emoji-button:hover {
  border-color: var(--brand-300);
  background: #f5f8ff;
}

.variable-textarea-emoji-picker {
  position: absolute;
  right: 10px;
  bottom: 52px;
  z-index: 80;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 36, 65, 0.18);
}

.variable-textarea-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--gray-400);
}

.variable-textarea-editor:focus {
  border-color: var(--brand-300);
  box-shadow: 0 0 0 4px rgba(70, 95, 255, 0.12);
}

.variable-textarea-token {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 2px;
  padding: 2px 6px;
  color: var(--brand-600);
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #f5f8ff;
  font-weight: 700;
  cursor: grab;
  white-space: nowrap;
}

.variable-textarea-token:active {
  cursor: grabbing;
}

.variable-textarea-drop-marker {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  max-width: 180px;
  min-height: 42px;
  margin: 0 5px;
  padding: 8px 18px;
  color: var(--gray-900);
  border: 2px solid #12b76a;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(18, 183, 106, 0.22);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.variable-textarea-drop-marker::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 999px;
  background: #12b76a;
  transform: translateX(-50%);
}

.variable-textarea-drop-marker::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: -7px;
  width: 16px;
  height: 3px;
  border-radius: 999px;
  background: #12b76a;
  transform: rotate(45deg);
  transform-origin: left center;
}

.variable-textarea-drag-preview {
  position: fixed;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  min-height: 58px;
  padding: 12px 16px;
  color: var(--gray-900);
  border: 2px solid #12b76a;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 30px rgba(18, 183, 106, 0.24);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  pointer-events: none;
  transform: translate(0, -100%);
  overflow: hidden;
  white-space: nowrap;
}

.variable-textarea-drag-preview-text {
  min-width: 0;
  color: var(--gray-500);
  overflow: hidden;
  text-overflow: ellipsis;
}

.variable-textarea-drag-preview-cursor {
  flex: 0 0 auto;
  width: 2px;
  height: 34px;
  border-radius: 999px;
  background: #12b76a;
}

.variable-textarea-drag-preview-variable {
  flex: 0 0 auto;
  max-width: 150px;
  padding: 5px 9px;
  color: var(--brand-600);
  border: 1px solid #cfe0ff;
  border-radius: 10px;
  background: #f5f8ff;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.variable-textarea-token button {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  padding: 0;
  color: var(--brand-600);
  border: 0;
  border-radius: 999px;
  background: #dce8ff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.variable-textarea-palette {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.variable-textarea-variables {
  display: grid;
  gap: 10px;
}

.variable-textarea-variables-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  color: var(--brand-600);
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #f8fbff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.variable-textarea-variables-toggle small {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  color: var(--brand-600);
  border-radius: 999px;
  background: #eaf2ff;
  font-size: 12px;
}

.variable-textarea-palette button {
  padding: 8px 11px;
  color: var(--brand-600);
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #f5f8ff;
  font-size: 12px;
  font-weight: 700;
  cursor: grab;
}

.variable-textarea-palette button:hover {
  border-color: #8eb8ff;
  background: #eaf2ff;
}

.variable-textarea-palette button:active {
  cursor: grabbing;
}

.campaign-template-preview {
  position: sticky;
  top: 20px;
}

.whatsapp-template-preview {
  overflow: hidden;
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(22, 37, 61, 0.06);
}

.whatsapp-template-preview-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--gray-100);
}

.whatsapp-template-preview-header strong {
  color: var(--gray-900);
  font-size: 18px;
  font-weight: 800;
}

.whatsapp-template-preview-body {
  min-height: 300px;
  padding: 24px 20px;
  background-color: #eee5dc;
  background-image:
    radial-gradient(circle at 12px 18px, rgba(16, 36, 71, 0.05) 0 2px, transparent 2px),
    radial-gradient(circle at 42px 46px, rgba(16, 36, 71, 0.04) 0 1px, transparent 1px),
    radial-gradient(circle at 72px 20px, rgba(16, 36, 71, 0.04) 0 1.5px, transparent 1.5px);
  background-size: 92px 72px;
}

.whatsapp-template-preview-card {
  max-width: 330px;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(22, 37, 61, 0.1);
}

.whatsapp-template-preview-message {
  padding: 14px 14px 8px;
  color: var(--gray-900);
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.whatsapp-template-preview-token.default {
  color: var(--gray-800);
}

.whatsapp-template-preview-token.meta {
  color: var(--error-600);
  font-weight: 700;
}

.whatsapp-template-preview-token.system {
  color: var(--brand-600);
  font-weight: 700;
}

.whatsapp-template-preview-time {
  display: block;
  padding: 0 10px 7px;
  color: var(--gray-400);
  font-size: 12px;
  text-align: right;
}

.whatsapp-template-preview-buttons {
  display: grid;
  border-top: 1px solid var(--gray-100);
}

.whatsapp-template-preview-buttons span {
  display: block;
  padding: 11px 14px;
  color: #008767;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  overflow-wrap: anywhere;
}

.whatsapp-template-preview-empty {
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 700;
}

.campaign-template-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 700;
}

.campaign-template-legend.hidden {
  display: none;
}

.campaign-template-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.campaign-template-legend i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.campaign-template-legend i.system {
  background: var(--brand-600);
}

.campaign-template-legend i.meta {
  background: var(--error-600);
}

.campaign-template-legend i.default {
  background: var(--gray-800);
}

.campaign-template-business-note {
  margin: 0;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.campaign-template-business-note a {
  color: var(--brand-600);
  font-weight: 700;
  text-decoration: none;
}

.campaign-template-business-note a:hover {
  text-decoration: underline;
}

.campaign-form-grid,
.campaign-filter-grid,
.auth-form-grid,
.config-form-grid {
  gap: 16px;
}

.campaign-form-grid label,
.campaign-filter-grid label {
  transition: transform 0.18s ease, color 0.18s ease;
}

.campaign-form-grid label:focus-within,
.campaign-filter-grid label:focus-within {
  color: var(--brand-600);
  transform: translateY(-1px);
}

.required-mark {
  margin-left: 4px;
  color: var(--error-600) !important;
  font-weight: 800;
}

.field-label-copy .required-mark {
  color: var(--error-600) !important;
}

.campaign-preview-title {
  padding: 18px 20px;
  border-bottom: 1px solid var(--gray-100);
}

.campaign-preview-title h3 {
  color: var(--gray-900);
}

.campaign-preview-row {
  min-height: 52px;
  margin: 0 20px;
  padding: 10px 0;
  border-top: 1px solid var(--gray-100);
  transition: background 0.18s ease, transform 0.18s ease;
}

.campaign-preview-row:hover {
  background: var(--gray-25);
  transform: translateX(2px);
}

.campaign-preview-row:first-of-type {
  border-top: 0;
}

.campaign-preview-row svg {
  color: var(--gray-400);
}

.campaign-preview-row span {
  color: var(--gray-500);
  font-size: 12px;
}

.campaign-preview-row strong {
  color: var(--gray-800);
  font-weight: 700;
}

.campaign-preview-row small {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 600;
}

.campaign-preview-row.highlight svg,
.campaign-preview-row.highlight strong {
  color: var(--brand-600);
}

.campaign-preview-more {
  margin: 0 20px;
  padding: 8px 0;
  border-top: 1px solid var(--gray-100);
}

.campaign-preview-more button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  color: var(--brand-600);
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.campaign-preview-more button svg {
  transition: transform 0.18s ease;
}

.campaign-preview-more.open button svg {
  transform: rotate(180deg);
}

.campaign-preview-more dl {
  display: grid;
  gap: 8px;
  margin: 4px 0 8px;
}

.campaign-preview-more dl div {
  display: grid;
  gap: 2px;
}

.campaign-preview-more dt {
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 700;
}

.campaign-preview-more dd {
  min-width: 0;
  margin: 0;
  color: var(--gray-800);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

@keyframes campaign-page-enter {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes campaign-preview-enter {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes campaign-soft-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes campaign-step-enter {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes campaign-first-step-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes campaign-step-pulse {
  0% {
    transform: translateY(-1px) scale(0.92);
  }

  60% {
    transform: translateY(-1px) scale(1.06);
  }

  100% {
    transform: translateY(-1px) scale(1);
  }
}

.campaign-actions {
  padding: 18px 24px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-25);
}

.details-modal {
  border-radius: 16px;
}

.details-hero {
  background: #ffffff;
  border-bottom: 1px solid var(--gray-100);
}

.details-main-icon,
.details-summary-icon {
  border-radius: 12px;
  color: #ffffff;
  background: var(--brand-500);
}

.details-main-icon svg,
.details-summary-icon svg,
.metadata-icon svg,
.detail-section-title span svg {
  color: #ffffff;
  stroke: #ffffff;
}

.details-summary-icon.green {
  background: #12b76a;
}

.details-summary-icon.orange {
  background: #f79009;
}

.details-summary-icon.blue {
  background: var(--brand-500);
}

.detail-section-title span,
.metadata-icon {
  color: #ffffff;
  background: var(--brand-500);
}

.details-summary {
  gap: 16px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.details-summary-card {
  border: 1px solid var(--gray-200);
  border-right: 1px solid var(--gray-200);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.details-summary-card:last-child {
  border-right: 1px solid var(--gray-200);
}

.details-content {
  background: var(--gray-50);
}

.subaside {
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.subaside-item {
  color: var(--gray-700);
  border-radius: 10px;
}

.subaside-item:hover,
.subaside-item.active {
  color: var(--brand-600);
  background: var(--brand-50);
}

.profile-panel {
  display: grid;
  gap: 24px;
  padding: 20px;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.profile-panel > h3 {
  margin: 0;
  color: var(--gray-800);
  font-size: 18px;
  font-weight: 700;
}

.profile-card {
  padding: 24px;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  background: #ffffff;
}

.profile-card h4 {
  margin: 0 0 24px;
  color: var(--gray-800);
  font-size: 18px;
  font-weight: 700;
}

.profile-card-note {
  margin: 24px 0 0;
  color: var(--gray-500);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.profile-card-note a {
  color: var(--brand-600);
  font-weight: 800;
  text-decoration: none;
}

.profile-card-note a:hover {
  text-decoration: underline;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 24px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #ffffff;
  border: 1px solid var(--brand-100);
  border-radius: 999px;
  background: var(--brand-500);
  font-size: 24px;
  font-weight: 800;
}

.profile-identity h4 {
  margin: 0 0 8px;
  color: var(--gray-800);
  font-size: 18px;
  font-weight: 700;
}

.profile-identity p {
  margin: 0;
  color: var(--gray-500);
  font-size: 14px;
  font-weight: 500;
}

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

.profile-field {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.profile-field-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--brand-500);
  border-radius: 999px;
  background: var(--brand-50);
}

.profile-field p {
  margin: 0 0 8px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 500;
}

.profile-field strong {
  display: block;
  min-width: 0;
  color: var(--gray-800);
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.profile-config-form {
  display: grid;
  gap: 16px;
}

.profile-config-toggle {
  max-width: 920px;
}

.profile-config-toggle span {
  display: grid;
  gap: 5px;
}

.profile-config-toggle strong {
  color: var(--gray-800);
  font-size: 15px;
}

.profile-config-toggle small {
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.profile-config-input {
  display: grid;
  max-width: 360px;
  gap: 8px;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 800;
}

.profile-config-input input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 0 12px;
  color: var(--gray-800);
  font-size: 14px;
  font-weight: 700;
}

.profile-config-form .button {
  justify-self: start;
}

.analytics-page {
  gap: 18px;
}

.analytics-panel,
.analytics-metric {
  border: 1px solid var(--gray-200);
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.analytics-panel {
  display: grid;
  gap: 22px;
  padding: 24px;
  border-radius: 8px;
}

.analytics-panel-header,
.analytics-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.analytics-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--brand-600);
  font-size: 13px;
  font-weight: 900;
}

.analytics-panel h3,
.analytics-panel h4 {
  margin: 0;
  color: var(--gray-800);
  font-weight: 950;
  letter-spacing: 0;
}

.analytics-panel h3 {
  font-size: 28px;
}

.analytics-panel h4 {
  font-size: 22px;
}

.analytics-panel p {
  margin: 6px 0 0;
  color: var(--gray-500);
  font-size: 16px;
  font-weight: 700;
}

.analytics-filter-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.analytics-filter-grid label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--gray-700);
  font-size: 15px;
  font-weight: 850;
}

.analytics-filter-grid input,
.analytics-filter-grid select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--gray-800);
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  background: #ffffff;
  font: inherit;
  font-weight: 800;
  outline: none;
  box-shadow: var(--shadow-xs);
}

.analytics-filter-grid input:focus,
.analytics-filter-grid select:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.16);
}

.analytics-filter-grid .button {
  min-height: 48px;
  white-space: nowrap;
}

.analytics-filter-button {
  min-width: 132px;
  padding-inline: 22px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 850;
}

.analytics-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.analytics-metric {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  padding: 20px;
  border-radius: 8px;
}

.analytics-metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  color: var(--brand-600);
  border-radius: 8px;
  background: var(--brand-50);
}

.analytics-metric p,
.analytics-metric small {
  margin: 0;
  color: var(--gray-500);
  font-weight: 800;
}

.analytics-metric strong {
  display: block;
  margin-top: 4px;
  color: var(--gray-800);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.analytics-metric small {
  display: block;
  margin-top: 6px;
  font-size: 13px;
}

.analytics-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--gray-500);
  font-weight: 850;
}

.analytics-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.analytics-legend i {
  display: inline-flex;
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.analytics-legend-cost {
  background: var(--brand-500);
}

.analytics-legend-volume {
  background: #f04438;
}

.analytics-chart-scroll {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}

.analytics-apex-chart {
  min-width: 650px;
  min-height: 320px;
}

.analytics-chart {
  width: 100%;
  min-width: 720px;
  height: auto;
  display: block;
}

.analytics-chart-grid {
  stroke: var(--gray-200);
  stroke-width: 1;
}

.analytics-chart-axis,
.analytics-chart-label {
  fill: var(--gray-500);
  font-size: 13px;
  font-weight: 800;
}

.analytics-chart-bar {
  fill: var(--brand-500);
}

.analytics-chart-line {
  fill: none;
  stroke: #12b76a;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.analytics-chart-point {
  fill: #ffffff;
  stroke: #12b76a;
  stroke-width: 4;
}

.analytics-empty-chart,
.analytics-chart-loading {
  display: grid;
  place-items: center;
  min-height: 280px;
  color: var(--gray-500);
  border: 1px dashed var(--gray-300);
  border-radius: 8px;
  background: var(--gray-25);
  text-align: center;
}

.analytics-empty-chart {
  gap: 8px;
}

.analytics-empty-chart svg {
  color: var(--brand-500);
}

.analytics-empty-chart strong {
  color: var(--gray-800);
  font-size: 20px;
  font-weight: 950;
}

.analytics-empty-chart span {
  font-weight: 750;
}

.analytics-chart-loading {
  align-content: center;
  justify-items: stretch;
  gap: 16px;
  padding: 42px;
}

.analytics-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--gray-100);
  border-radius: 8px;
}

.analytics-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.analytics-table th,
.analytics-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-600);
  font-weight: 800;
  text-align: left;
}

.analytics-table th {
  color: var(--gray-500);
  background: var(--gray-25);
  font-size: 14px;
  font-weight: 900;
}

.analytics-table tbody tr:last-child td {
  border-bottom: 0;
}

.analytics-page .apexcharts-legend-text {
  color: var(--gray-700) !important;
  padding-left: 14px !important;
  font-weight: 800 !important;
}

.analytics-page .apexcharts-legend-marker {
  margin-right: 8px !important;
}

.analytics-page .apexcharts-text {
  fill: var(--gray-500) !important;
  font-family: "Outfit", sans-serif !important;
  font-weight: 750 !important;
}

.analytics-page .apexcharts-tooltip.apexcharts-theme-light {
  padding: 12px !important;
  border: 1px solid var(--gray-200) !important;
  border-radius: 8px !important;
  box-shadow: var(--shadow-sm) !important;
}

.analytics-page .apexcharts-tooltip-title {
  margin-bottom: 8px !important;
  padding: 0 !important;
  color: var(--gray-800) !important;
  border-bottom: 0 !important;
  background: transparent !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.analytics-page .apexcharts-tooltip-text {
  color: var(--gray-700) !important;
  font-family: "Outfit", sans-serif !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

.analytics-page .apexcharts-gridline {
  stroke: var(--gray-100) !important;
}

.profile-field-skeleton {
  align-items: center;
}

.skeleton-dot,
.skeleton-line {
  display: block;
  background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 45%, #eef2f7 100%);
  background-size: 180% 100%;
  animation: profile-skeleton-pulse 1.15s ease-in-out infinite;
}

.skeleton-dot {
  border-radius: 999px;
}

.skeleton-line {
  width: min(100%, 220px);
  height: 14px;
  border-radius: 999px;
}

.skeleton-line.short {
  width: 92px;
  height: 10px;
  margin-bottom: 10px;
}

.profile-note-skeleton {
  width: min(100%, 420px);
  margin-top: 24px;
}

@keyframes profile-skeleton-pulse {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

.badge,
.status-badge {
  border-radius: 999px;
  font-weight: 600;
}

.badge-neutral {
  color: var(--gray-600);
  background: var(--gray-100);
}

.badge-info {
  color: #2563eb;
  background: #dbeafe;
}

.badge-success {
  color: var(--success-600);
  background: var(--success-50);
}

.badge-warning {
  color: var(--warning-600);
  background: var(--warning-50);
}

.badge-error,
.badge-danger {
  color: var(--error-600);
  background: var(--error-50);
}

.campaign-comments-toggle {
  gap: 6px;
  white-space: nowrap;
}

.campaign-comments-toggle svg:last-child {
  transition: transform 0.16s ease;
}

.campaign-comments-toggle.open svg:last-child {
  transform: rotate(180deg);
}

.campaign-comments-row td {
  padding: 0 18px 18px;
  background: var(--gray-25);
}

.campaign-comments-panel {
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.campaign-comments-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.campaign-comments-actions .button {
  min-height: 38px;
  padding: 8px 12px;
}

.campaign-comments-state,
.campaign-comments-error {
  display: block;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 600;
}

.campaign-comments-error {
  color: var(--error-600);
}

.campaign-comments-list {
  display: grid;
  gap: 10px;
}

.campaign-comment-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  background: var(--gray-25);
}

.campaign-comment-item > div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 600;
}

.campaign-comment-item p {
  margin: 0;
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.skeleton-block {
  border-radius: 8px;
  background: linear-gradient(90deg, var(--gray-100), var(--gray-50), var(--gray-100));
}

@media (max-width: 1100px) {
  .app-shell {
    display: block;
  }

  .navigation-hidden .campaign-create-page {
    padding-right: 390px;
  }

  .campaign-create-page {
    padding-right: 390px;
  }

  .campaign-create-page .campaign-preview {
    top: 16px;
    right: 16px;
    width: 358px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 290px;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .nav-menu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .sidebar-footer {
    display: flex;
    margin-top: auto;
  }

  .sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    border: 0;
    background: rgba(16, 24, 40, 0.42);
  }

  .sidebar-open .sidebar-overlay {
    display: block;
  }

  .topbar-menu {
    display: grid;
  }

  .topbar-search {
    display: none;
  }
}

@media (min-width: 1101px) {
  .sidebar-overlay {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .navigation-hidden .campaign-create-page,
  .navigation-hidden .campaign-preview,
  .campaign-processing-notice,
  .campaign-step-panel {
    animation: none;
  }

  .campaign-create-header .button,
  .campaign-actions .button,
  .campaign-form-grid label,
  .campaign-filter-grid label,
  .campaign-preview-row,
  .campaign-step,
  .campaign-step span {
    transition: none;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 12px 16px;
  }

  .app-shell.navigation-hidden .content {
    padding: 0;
  }

  .modal-backdrop,
  .details-backdrop {
    padding: 0;
  }

  .chat-page {
    height: 100vh;
    min-height: 520px;
    grid-template-columns: 1fr;
    border: 0;
    border-radius: 0;
  }

  .chat-conversation-overlay {
    position: absolute;
    inset: 0;
    z-index: 35;
    display: none;
    border: 0;
    background: rgba(16, 24, 40, 0.42);
  }

  .chat-page.conversation-aside-open .chat-conversation-overlay {
    display: block;
  }

  .chat-mobile-list-button {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }

  .chat-welcome {
    align-content: center;
  }

  .chat-welcome-list-button {
    position: absolute;
    left: 14px;
    top: 14px;
    display: inline-flex;
    min-height: 40px;
    padding: 0 14px;
  }

  .chat-list-panel {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(360px, 88vw);
    max-height: none;
    height: 100%;
    border-right: 1px solid var(--gray-200);
    border-bottom: 0;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 16px 0 32px rgba(16, 24, 40, 0.16);
  }

  .chat-page.conversation-aside-open .chat-list-panel {
    transform: translateX(0);
  }

  .chat-list-toolbar {
    flex-wrap: nowrap;
    gap: 10px;
    padding: 12px;
  }

  .chat-list-toolbar .chat-new-send-button {
    margin-left: auto;
  }

  .outscraper-form,
  .outscraper-detail-grid,
  .outscraper-result dl {
    grid-template-columns: 1fr;
  }

  .modal-backdrop.chat-history-status-backdrop {
    inset: 0;
  }

  .chat-image-lightbox-backdrop {
    inset: 12px;
  }

  .chat-conversation-header {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-height: 0;
    padding: 10px 12px;
  }

  .chat-conversation-header > div:not(.chat-header-actions) {
    flex: 1 1 calc(100% - 104px);
    min-width: 0;
  }

  .chat-conversation-header strong,
  .chat-conversation-header span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .chat-header-actions {
    width: 100%;
    gap: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
    align-items: center;
    flex: 1 1 100%;
  }

  .chat-observation-button {
    width: 100%;
    justify-content: center;
    min-height: 36px;
    padding: 0 10px;
  }

  .chat-tag-actions {
    justify-self: end;
    min-width: max-content;
  }

  .chat-conversation-body {
    padding: 18px 14px;
  }

  .chat-bubble {
    max-width: 88%;
  }

  .chat-compose {
    padding: 12px;
  }

  .chat-conversation-window {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    border-radius: 18px;
  }

  .chat-conversation-window span {
    min-width: 0;
    white-space: normal;
  }

  .chat-window-info-button {
    white-space: nowrap;
  }

  .chat-window-new-send {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  .chat-compose .variable-textarea-emoji-picker {
    left: 0;
    right: auto;
    bottom: 48px;
    width: min(320px, calc(100vw - 36px));
    max-width: calc(100vw - 36px);
  }

  .chat-compose .variable-textarea-emoji-picker aside {
    max-width: 100%;
  }

  .chat-send-modal {
    position: fixed;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    transform: none;
    width: auto;
    height: auto;
    max-height: none;
  }

  .chat-send-modal-body {
    padding: 16px;
  }

  .chat-send-modal-body .campaign-template-step {
    min-height: 0;
  }

  .chat-send-modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .chat-send-feedback {
    margin-right: 0;
  }

  .topbar-user-text {
    display: none;
  }

  .page-header,
  .page-stack {
    padding-left: 16px;
    padding-right: 16px;
  }

  .panel-header,
  .campaign-create-header,
  .campaign-step-content,
  .campaign-actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  .campaign-create-main {
    overflow: hidden;
    border-radius: 0;
  }

  .campaign-create-header {
    margin-bottom: 28px;
  }

  .campaign-steps {
    display: none;
  }

  .campaign-mobile-step-status {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    align-items: center;
    margin: 0 16px 16px;
    padding: 14px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-xs);
  }

  .campaign-mobile-step-status span {
    color: var(--gray-500);
    font-size: 13px;
    font-weight: 800;
  }

  .campaign-mobile-step-status strong {
    min-width: 0;
    color: var(--gray-900);
    font-size: 18px;
    font-weight: 850;
    overflow-wrap: anywhere;
  }

  .campaign-mobile-step-status .button {
    grid-row: 1 / span 2;
    grid-column: 2;
    min-height: 40px;
    padding: 0 12px;
  }

  .campaign-processing-notice {
    margin: 0 16px 18px;
    padding: 14px 14px 14px 54px;
    overflow-wrap: anywhere;
  }

  .campaign-form-grid,
  .campaign-filter-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .campaign-form-grid label,
  .campaign-filter-grid label {
    min-width: 0;
  }

  .analytics-panel {
    padding: 18px;
  }

  .analytics-panel-header,
  .analytics-chart-header {
    display: grid;
  }

  .analytics-panel h3 {
    font-size: 24px;
  }

  .analytics-panel h4 {
    font-size: 20px;
  }

  .analytics-panel p {
    font-size: 14px;
  }

  .analytics-filter-grid,
  .analytics-metrics-grid {
    grid-template-columns: 1fr;
  }

  .analytics-filter-grid .button,
  .analytics-panel-header .button {
    width: 100%;
  }

  .analytics-metric strong {
    font-size: 22px;
  }

  .analytics-chart {
    min-width: 680px;
  }

  .analytics-legend {
    flex-wrap: wrap;
  }

  .field-label-copy small {
    overflow-wrap: anywhere;
  }

  .campaign-create-page,
  .navigation-hidden .campaign-create-page {
    padding-right: 0;
  }

  .campaign-template-step {
    grid-template-columns: 1fr;
  }

  .campaign-details-body,
  .campaign-details-summary {
    grid-template-columns: 1fr;
  }

  .campaign-create-page .campaign-preview,
  .navigation-hidden .campaign-preview {
    position: static;
    display: none;
    width: 100%;
    max-width: none;
    max-height: none;
    margin-top: 24px;
  }

  .campaign-create-page .campaign-preview.mobile-modal-preview,
  .navigation-hidden .campaign-preview.mobile-modal-preview {
    display: block;
    margin: 0;
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .campaign-mobile-preview-backdrop {
    inset: 0;
  }

  .campaign-mobile-preview-modal {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .campaign-mobile-preview-body {
    min-height: 0;
    overflow-y: auto;
    background: #ffffff;
  }
}

@media (max-width: 520px) {
  .chat-page {
    border-radius: 0;
  }

  .chat-list-panel {
    width: min(340px, 92vw);
  }

  .chat-list-toolbar .button {
    min-height: 40px;
    padding: 0 10px;
  }

  .chat-list-toolbar .chat-sound-button {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .chat-conversation-header {
    align-items: flex-start;
  }

  .chat-conversation-header .chat-avatar.large {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .chat-observation-button {
    justify-content: center;
  }

  .chat-tag-actions {
    justify-self: center;
    margin-left: 0;
  }

  .chat-header-actions {
    grid-template-columns: 1fr;
  }

  .chat-conversation-window {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .chat-window-info-button {
    grid-column: 2;
    justify-self: start;
  }
}
:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #15233b;
  background: #f6f8fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 16px;
  color: #dbe7fb;
  background: linear-gradient(180deg, #06213e 0%, #02152a 100%);
}

.brand,
.sidebar-footer,
.nav-item,
.button,
.pagination {
  display: flex;
  align-items: center;
}

.brand {
  gap: 14px;
  padding: 0 14px 30px;
}

.brand-mark,
.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  color: #081d35;
  border-radius: 8px;
  background: #12bf72;
}

.brand strong,
.sidebar-footer strong {
  display: block;
  color: #ffffff;
}

.brand span,
.sidebar-footer span {
  display: block;
  margin-top: 3px;
  color: #d2dbea;
  font-weight: 600;
}

.nav-menu {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  gap: 14px;
  padding: 15px 16px;
  color: #c2d0e5;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-decoration: none;
  text-align: left;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-chevron {
  margin-left: auto;
  transition: transform 0.18s ease;
}

.nav-group.open .nav-chevron {
  transform: rotate(180deg);
}

.nav-submenu {
  display: grid;
  gap: 5px;
  padding-left: 18px;
}

.nav-subitem {
  width: 100%;
  gap: 10px;
  padding: 11px 14px;
  color: #d2dbea;
  border: 0;
  border-left: 1px solid rgba(170, 187, 210, 0.22);
  border-radius: 8px;
  background: transparent;
  text-decoration: none;
  text-align: left;
}

.nav-subitem:hover,
.nav-subitem.active {
  color: #ffffff;
  background: rgba(68, 114, 170, 0.2);
}

.nav-subitem.active {
  border-left-color: #13c77c;
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff;
  background: rgba(68, 114, 170, 0.28);
}

.nav-item.active svg {
  color: #13c77c;
}

.sidebar-footer {
  gap: 12px;
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(205, 220, 242, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-user {
  min-width: 0;
}

.sidebar-user strong,
.sidebar-user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-logout {
  width: 36px;
  height: 36px;
  margin-left: auto;
  color: #dbe7fb;
  border-color: rgba(205, 220, 242, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-logout:hover {
  color: #ffffff;
  border-color: rgba(205, 220, 242, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.avatar {
  width: 40px;
  height: 40px;
  color: #ffffff;
  border-radius: 999px;
  background: #12bf72;
  font-weight: 800;
}

.content {
  padding: 34px;
  overflow: hidden;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(140deg, rgba(6, 33, 62, 0.94), rgba(6, 33, 62, 0.72)),
    linear-gradient(90deg, #f6f8fb 0%, #e8eef7 100%);
}

.auth-panel {
  width: min(460px, 100%);
  display: grid;
  gap: 22px;
  padding: 28px;
  border: 1px solid #dfe6f1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(6, 19, 38, 0.22);
}

.auth-panel-wide {
  width: min(720px, 100%);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-brand strong {
  display: block;
  color: #0e1f39;
  font-weight: 650;
}

.auth-brand span {
  display: block;
  margin-top: 3px;
  color: #66748d;
  font-weight: 500;
}

.auth-header h1 {
  margin: 0;
  color: #10213c;
  font-size: 28px;
  font-weight: 650;
  line-height: 1.15;
}

.auth-header p {
  margin: 8px 0 0;
  color: #66748d;
  font-weight: 500;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-full-field {
  grid-column: 1 / -1;
}

.auth-field {
  height: 46px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #ffffff;
}

.auth-field:focus-within {
  border-color: #2d6df6;
  box-shadow: 0 0 0 3px rgba(45, 109, 246, 0.12);
}

.auth-field svg {
  color: #66748d;
}

.auth-form label {
  font-weight: 650;
}

.auth-field input {
  height: 44px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-weight: 450;
}

.auth-field input:focus {
  box-shadow: none;
}

.auth-field input::placeholder {
  color: #7d8797;
  font-weight: 450;
}

.auth-submit {
  width: 100%;
  min-height: 46px;
  font-weight: 650;
}

.auth-switch {
  display: flex;
  justify-content: center;
  gap: 8px;
  color: #66748d;
  font-size: 14px;
  font-weight: 500;
}

.auth-switch button {
  padding: 0;
  color: #1768f2;
  border: 0;
  background: transparent;
  font-weight: 650;
}

.auth-switch button:hover {
  text-decoration: underline;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.15;
}

.page-header p {
  margin: 10px 0 0;
  color: #697791;
  font-size: 16px;
  font-weight: 600;
}

.summary-card,
.panel,
.filter-panel {
  border: 1px solid #dfe6f1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(22, 37, 61, 0.04);
}

.summary-card span,
.info-item span {
  color: #66748d;
  font-size: 13px;
  font-weight: 700;
}

.page-stack {
  display: grid;
  gap: 20px;
}

.summary-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  min-height: 132px;
  padding: 24px;
}

.summary-card strong {
  display: block;
  margin-top: 10px;
  color: #0e1f39;
  font-size: 26px;
}

.summary-card small {
  display: block;
  margin-top: 8px;
  color: #738099;
  font-weight: 700;
}

.summary-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
}

.summary-blue {
  color: #2d6df6;
  background: #edf4ff;
}

.summary-green {
  color: #0dac68;
  background: #eafaf1;
}

.summary-purple {
  color: #7347ff;
  background: #f1edff;
}

.panel,
.filter-panel {
  padding: 18px;
}

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

.panel-header h2 {
  margin: 0;
  font-size: 18px;
}

.panel-header p {
  margin: 5px 0 0;
  color: #6e7b91;
  font-size: 14px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
  gap: 14px;
}

label {
  min-width: 0;
  display: grid;
  gap: 8px;
  color: #243451;
  font-size: 14px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  color: #15233b;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #ffffff;
  outline: 0;
}

input:focus,
select:focus {
  border-color: #2d6df6;
  box-shadow: 0 0 0 3px rgba(45, 109, 246, 0.12);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 14px;
}

.filter-trigger-row,
.filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 23, 43, 0.48);
}

.filter-popup {
  width: min(1080px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: visible;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(6, 19, 38, 0.26);
}

.filter-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid #e5ebf4;
}

.filter-popup-header h2 {
  margin: 0;
  color: #10213c;
  font-size: 20px;
}

.filter-popup-header p {
  margin: 6px 0 0;
  color: #66748d;
  font-size: 14px;
  font-weight: 700;
}

.filter-popup-body {
  min-height: 0;
  overflow: visible;
  padding: 20px;
}

.filter-popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #e5ebf4;
  background: #fbfcfe;
}

.count-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.count-summary span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  color: #66748d;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  background: #fbfcfe;
  font-size: 13px;
  font-weight: 800;
}

.count-summary strong {
  color: #102447;
}

.count-summary small {
  color: #566174;
  font-size: 10px;
  font-weight: 800;
}

.count-summary .count-loading {
  color: #2d6df6;
  background: #edf4ff;
}

.count-summary .count-error {
  color: #b4232c;
  background: #fff1f2;
}

.range-field-label,
.date-range-field-label {
  gap: 8px;
}

.range-field,
.date-range-field {
  height: 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #ffffff;
}

.range-field:focus-within,
.date-range-field:focus-within {
  border-color: #2d6df6;
  box-shadow: 0 0 0 3px rgba(45, 109, 246, 0.12);
}

.range-field-input,
.date-range-field-input {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}

.range-field-input span,
.date-range-field-input span {
  color: #6d7b92;
  font-size: 12px;
  font-weight: 900;
}

.range-field-input input,
.date-range-field-input input {
  height: 44px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-weight: 800;
}

.range-field-input input:focus,
.date-range-field-input input:focus {
  box-shadow: none;
}

.range-field-divider,
.date-range-field-divider {
  width: 1px;
  height: 24px;
  background: #dce4ef;
}

.date-range-field-input input {
  color-scheme: light;
  font-size: 13px;
}

.date-range-field-label {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 8px;
  color: #243451;
  font-size: 14px;
  font-weight: 800;
}

.date-range-field-label > span {
  display: block;
}

.date-range-picker {
  position: relative;
  min-width: 0;
}

.date-range-trigger {
  width: 100%;
  height: 46px;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: #15233b;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #ffffff;
  font-weight: 800;
  text-align: left;
}

.date-range-trigger:focus,
.date-range-picker.open .date-range-trigger {
  border-color: #2d6df6;
  box-shadow: 0 0 0 3px rgba(45, 109, 246, 0.12);
}

.date-range-trigger > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-range-placeholder {
  color: #737b8c;
}

.date-range-clear {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #51617c;
  border-radius: 6px;
}

.date-range-clear:hover {
  background: #eef3fb;
}

.date-range-popover {
  position: absolute;
  z-index: 120;
  top: calc(100% + 8px);
  left: 0;
  width: min(360px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(15, 31, 55, 0.18);
}

.date-range-calendar-header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.date-range-calendar-header button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #51617c;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #ffffff;
}

.date-range-calendar-header button:hover {
  background: #f4f7fb;
}

.date-range-period-controls {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(74px, 0.65fr);
  gap: 6px;
}

.date-range-period-controls select {
  width: 100%;
  height: 34px;
  min-width: 0;
  padding: 0 8px;
  color: #172945;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
  font-size: 13px;
  font-weight: 850;
}

.date-range-period-controls select:focus {
  border-color: #2d6df6;
  box-shadow: 0 0 0 3px rgba(45, 109, 246, 0.12);
}

.date-range-weekdays,
.date-range-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.date-range-weekdays {
  margin-bottom: 6px;
}

.date-range-weekdays span {
  color: #6d7b92;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.date-range-day {
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  color: #111827;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 850;
}

.date-range-day:hover {
  border-color: #bfd0ea;
  background: #ffffff;
}

.date-range-day.muted {
  color: #5f697a;
  font-weight: 600;
}

.date-range-day.in-range {
  color: #111827;
  background: #f5f8ff;
  border-color: #dbe7fb;
}

.date-range-day.range-edge {
  color: #ffffff;
  background: #2d6df6;
  border-color: #2d6df6;
}

.date-range-day.disabled {
  color: #c3cbd8;
  background: #ffffff;
  cursor: not-allowed;
}

.date-range-selected-label {
  min-height: 18px;
  margin-top: 12px;
  color: #52637f;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.date-range-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.date-range-actions button {
  min-height: 38px;
  padding: 0 12px;
  color: #111827;
  border: 1px solid #d0d7e2;
  background: #ffffff;
  font-size: 13px;
}

.date-range-actions button:hover {
  border-color: #9dacbf;
  background: #ffffff;
}

.custom-select {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.custom-select.open {
  z-index: 90;
}

.custom-select-trigger {
  width: 100%;
  height: 46px;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  overflow: hidden;
  color: #15233b;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #ffffff;
  font-weight: 700;
  text-align: left;
}

.custom-select-value-button {
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px 0 14px;
  color: inherit;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
}

.custom-select-value-button > span {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-value-button svg {
  flex: 0 0 auto;
}

.custom-select-icon-button {
  width: 38px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #53627a;
  border: 0;
  border-left: 1px solid #e5ebf4;
  background: transparent;
}

.custom-select-icon-button:hover {
  color: #2d6df6;
  background: #f3f7ff;
}

.custom-select.open .custom-select-trigger,
.custom-select-trigger:focus-within {
  border-color: #2d6df6;
  box-shadow: 0 0 0 3px rgba(45, 109, 246, 0.12);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 2147483001;
  overflow: hidden;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(23, 38, 64, 0.14);
}

.custom-select-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid #e8edf5;
}

.custom-select-search svg {
  flex: 0 0 auto;
  color: #66748d;
}

.custom-select-search input {
  height: 38px;
  min-width: 0;
}

.custom-select-bulk-row {
  display: flex;
  justify-content: flex-end;
  padding: 8px 10px;
  border-bottom: 1px solid #e8edf5;
}

.custom-select-bulk-row .button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.custom-select-options {
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
}

.custom-select-option {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 10px;
  color: #22334f;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
}

.custom-select-option:hover {
  background: #edf4ff;
}

.custom-select-option.check-option {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
}

.custom-select-option.checked {
  background: #edf4ff;
}

.custom-select-checkbox {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border: 1px solid #b8c6da;
  border-radius: 4px;
  background: #ffffff;
}

.custom-select-option.checked .custom-select-checkbox {
  border-color: #2d6df6;
  background: #2d6df6;
}

.custom-select-option-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.custom-select-skeleton {
  display: grid;
  gap: 8px;
  padding: 6px 4px;
}

.custom-select-skeleton span {
  height: 38px;
  overflow: hidden;
  border-radius: 7px;
  background: linear-gradient(90deg, #eef3fa 0%, #f8fbff 45%, #eef3fa 90%);
  background-size: 220% 100%;
  animation: custom-select-skeleton 1.1s ease-in-out infinite;
}

@keyframes custom-select-skeleton {
  0% {
    background-position: 120% 0;
  }

  100% {
    background-position: -120% 0;
  }
}

.custom-select-option strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.custom-select-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 23, 43, 0.48);
}

.custom-select-dialog {
  width: min(720px, 100%);
  height: min(720px, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(6, 19, 38, 0.26);
}

.custom-select-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e5ebf4;
}

.custom-select-dialog-header strong {
  color: #172947;
  font-size: 16px;
}

.custom-select-dialog-body {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.custom-select-dialog .custom-select-options {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.custom-select-dialog .custom-select-option strong {
  white-space: normal;
}

.custom-select-selected-label {
  width: max-content;
  max-width: 100%;
  padding: 0;
  color: #2d6df6;
  border: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}

.custom-select-selected-label:hover {
  text-decoration: underline;
}

.custom-select-selected-panel {
  display: grid;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid #e5ebf4;
  background: #fbfcfe;
}

.custom-select-selected-panel > strong {
  color: #53627a;
  font-size: 12px;
}

.custom-select-selected-items {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-height: 96px;
  overflow-y: auto;
}

.custom-select-selected-items button {
  max-width: 100%;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  color: #172947;
  border: 1px solid #dce4ef;
  border-radius: 7px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.custom-select-selected-items button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-option span,
.custom-select-status {
  color: #6d7b92;
  font-size: 12px;
  font-weight: 800;
}

.custom-select-option .custom-select-checkbox {
  color: #ffffff;
}

.custom-select-status {
  padding: 12px 10px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e2e8f2;
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #ffffff;
}

th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid #e8edf5;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #273957;
  font-size: 13px;
  background: #fbfcfe;
}

td {
  color: #40516d;
  font-size: 14px;
  font-weight: 650;
}

td strong {
  display: block;
  color: #243451;
}

td span {
  display: block;
  margin-top: 4px;
  color: #718098;
  font-weight: 600;
}

.campaign-list-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-status-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-top: 0;
}

.campaign-status-indicator span {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-top: 0;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.14);
}

.campaign-status-indicator.success span {
  background: #008a4c;
  box-shadow: 0 0 0 4px rgba(0, 138, 76, 0.2);
}

.campaign-status-indicator.danger span {
  background: #d11f1f;
  box-shadow: 0 0 0 4px rgba(209, 31, 31, 0.2);
}

tr:last-child td {
  border-bottom: 0;
}

.button {
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 800;
}

.button-primary {
  color: #ffffff;
  border: 1px solid #0ca963;
  background: #0bb469;
}

.button-outline,
.button-light {
  color: #2d6df6;
  border: 1px solid #cddcff;
  background: #ffffff;
}

.button-light {
  color: #51617a;
}

.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.badge-green {
  color: #099456;
  background: #dcf8e9;
}

.badge-red {
  color: #de3d47;
  background: #ffe5e8;
}

.badge-neutral {
  color: #4d5d77;
}

.badge-info {
  color: #2563eb;
  background: #dbeafe;
}

.pagination {
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.page-pill {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  color: #ffffff;
  border-radius: 8px;
  background: #2d6df6;
  font-weight: 800;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.info-item {
  min-height: 92px;
  padding: 16px;
  border: 1px solid #e2e8f2;
  border-radius: 8px;
  background: #fbfcfe;
}

.info-item strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: #192943;
}

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

.stats-grid.single {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 96px;
  padding: 18px;
  border: 1px solid #e0e8f4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(23, 38, 64, 0.04);
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  color: #2d6df6;
  border-radius: 8px;
  background: #edf4ff;
}

.stat-icon.green {
  color: #0b9b61;
  background: #e4f8ed;
}

.stat-icon.purple {
  color: #7655ff;
  background: #f0edff;
}

.stat-card span {
  color: #6b7891;
  font-size: 13px;
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 5px;
  color: #102447;
  font-size: 24px;
}

.stat-card p {
  margin: 6px 0 0;
  color: #748199;
  font-size: 13px;
  font-weight: 700;
}

.admin-filter-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 320px));
  gap: 16px;
  align-items: end;
  padding: 16px;
  overflow: visible;
}

.campaign-form {
  overflow: visible;
}

.campaign-form-grid,
.campaign-filter-grid {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 20px;
  overflow: visible;
}
.campaign-form-grid label{
  margin-top: 20px;
}

.campaign-form-grid .campaign-checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.campaign-checkbox-field input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #2444ff;
  box-shadow: none;
}

.campaign-checkbox-field input:focus {
  box-shadow: none;
}

.campaign-filter-grid label {
  margin-top: 20px;
}

.campaign-filter-grid {
  grid-template-columns: repeat(3, minmax(240px, 1fr));
}

.campaign-template-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
  align-items: start;
}

.campaign-template-fields,
.campaign-template-preview {
  display: grid;
  gap: 14px;
}

.campaign-template-summary {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid #e4ebf5;
  border-radius: 8px;
  background: #f8fbff;
}

.campaign-template-summary span,
.campaign-template-summary small {
  color: #66748d;
  font-size: 12px;
  font-weight: 800;
}

.campaign-template-summary strong {
  color: #102447;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.campaign-template-approval-alert {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  color: #b42318;
  border: 1px solid #fda29b;
  border-radius: 8px;
  background: #fff1f0;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.campaign-template-approval-alert strong,
.campaign-template-approval-alert b {
  color: #b42318;
}

.campaign-template-approval-alert a {
  color: #b42318;
  font-weight: 850;
}

.campaign-template-parameter-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e4ebf5;
  border-radius: 8px;
}

.campaign-template-parameter-group > div {
  display: grid;
  gap: 4px;
}

.campaign-template-parameter-group strong {
  color: #102447;
}

.campaign-template-parameter-group small {
  color: #66748d;
  font-weight: 700;
  line-height: 1.5;
  white-space: pre-wrap;
}

.campaign-template-parameter-field {
  display: grid;
  gap: 8px;
}

.variable-textarea-wrap {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

.variable-textarea-editor-shell {
  position: relative;
}

.variable-textarea-editor {
  min-height: 190px;
  padding: 12px 14px;
  color: #102447;
  border: 1px solid #d3dce9;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 36, 65, 0.04);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.45;
  outline: 0;
  overflow: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.variable-textarea-emoji-button {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #d3dce9;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(15, 36, 65, 0.08);
  cursor: pointer;
}

.variable-textarea-emoji-button:hover {
  border-color: #8eb8ff;
  background: #f5f8ff;
}

.variable-textarea-emoji-picker {
  position: absolute;
  right: 10px;
  bottom: 52px;
  z-index: 80;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 36, 65, 0.18);
}

.variable-textarea-editor:empty::before {
  content: attr(data-placeholder);
  color: #5f697a;
}

.variable-textarea-editor:focus {
  border-color: #8eb8ff;
  box-shadow: 0 0 0 4px rgba(36, 68, 255, 0.12);
}

.variable-textarea-token {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 2px;
  padding: 2px 6px;
  color: #2444ff;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #f5f8ff;
  font-weight: 850;
  cursor: grab;
  white-space: nowrap;
}

.variable-textarea-token:active {
  cursor: grabbing;
}

.variable-textarea-drop-marker {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  max-width: 180px;
  min-height: 42px;
  margin: 0 5px;
  padding: 8px 18px;
  color: #111827;
  border: 2px solid #12b76a;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(18, 183, 106, 0.22);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.1;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.variable-textarea-drop-marker::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 999px;
  background: #12b76a;
  transform: translateX(-50%);
}

.variable-textarea-drop-marker::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: -7px;
  width: 16px;
  height: 3px;
  border-radius: 999px;
  background: #12b76a;
  transform: rotate(45deg);
  transform-origin: left center;
}

.variable-textarea-drag-preview {
  position: fixed;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  min-height: 58px;
  padding: 12px 16px;
  color: #111827;
  border: 2px solid #12b76a;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 30px rgba(18, 183, 106, 0.24);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.25;
  pointer-events: none;
  transform: translate(0, -100%);
  overflow: hidden;
  white-space: nowrap;
}

.variable-textarea-drag-preview-text {
  min-width: 0;
  color: #66748d;
  overflow: hidden;
  text-overflow: ellipsis;
}

.variable-textarea-drag-preview-cursor {
  flex: 0 0 auto;
  width: 2px;
  height: 34px;
  border-radius: 999px;
  background: #12b76a;
}

.variable-textarea-drag-preview-variable {
  flex: 0 0 auto;
  max-width: 150px;
  padding: 5px 9px;
  color: #2444ff;
  border: 1px solid #cfe0ff;
  border-radius: 10px;
  background: #f5f8ff;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.variable-textarea-token button {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  padding: 0;
  color: #2444ff;
  border: 0;
  border-radius: 999px;
  background: #dce8ff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.variable-textarea-palette {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.variable-textarea-variables {
  display: grid;
  gap: 10px;
}

.variable-textarea-variables-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  color: #2444ff;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #f8fbff;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.variable-textarea-variables-toggle small {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  color: #2444ff;
  border-radius: 999px;
  background: #eaf2ff;
  font-size: 12px;
}

.variable-textarea-palette button {
  padding: 8px 11px;
  color: #2444ff;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #f5f8ff;
  font-size: 12px;
  font-weight: 850;
  cursor: grab;
}

.variable-textarea-palette button:hover {
  border-color: #8eb8ff;
  background: #eaf2ff;
}

.variable-textarea-palette button:active {
  cursor: grabbing;
}

.campaign-template-preview {
  position: sticky;
  top: 20px;
}

.whatsapp-template-preview {
  overflow: hidden;
  border: 1px solid #dfe6f1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(22, 37, 61, 0.06);
}

.whatsapp-template-preview-header {
  padding: 16px 18px;
  border-bottom: 1px solid #e4ebf5;
}

.whatsapp-template-preview-header strong {
  color: #102447;
  font-size: 18px;
  font-weight: 850;
}

.whatsapp-template-preview-body {
  min-height: 300px;
  padding: 24px 20px;
  background-color: #eee5dc;
  background-image:
    radial-gradient(circle at 12px 18px, rgba(16, 36, 71, 0.05) 0 2px, transparent 2px),
    radial-gradient(circle at 42px 46px, rgba(16, 36, 71, 0.04) 0 1px, transparent 1px),
    radial-gradient(circle at 72px 20px, rgba(16, 36, 71, 0.04) 0 1.5px, transparent 1.5px);
  background-size: 92px 72px;
}

.whatsapp-template-preview-card {
  max-width: 330px;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(22, 37, 61, 0.1);
}

.whatsapp-template-preview-message {
  padding: 14px 14px 8px;
  color: #111827;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.whatsapp-template-preview-token.default {
  color: #12203a;
}

.whatsapp-template-preview-token.meta {
  color: #d92d20;
  font-weight: 850;
}

.whatsapp-template-preview-token.system {
  color: #2444ff;
  font-weight: 850;
}

.whatsapp-template-preview-time {
  display: block;
  padding: 0 10px 7px;
  color: #566174;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

.whatsapp-template-preview-buttons {
  display: grid;
  border-top: 1px solid #e4ebf5;
}

.whatsapp-template-preview-buttons span {
  display: block;
  padding: 11px 14px;
  color: #008767;
  font-size: 14px;
  font-weight: 850;
  text-align: center;
  overflow-wrap: anywhere;
}

.whatsapp-template-preview-empty {
  color: #66748d;
  font-size: 13px;
  font-weight: 800;
}

.campaign-template-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  color: #66748d;
  font-size: 12px;
  font-weight: 800;
}

.campaign-template-legend.hidden {
  display: none;
}

.campaign-template-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.campaign-template-legend i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.campaign-template-legend i.system {
  background: #2444ff;
}

.campaign-template-legend i.meta {
  background: #d92d20;
}

.campaign-template-legend i.default {
  background: #12203a;
}

.campaign-template-business-note {
  margin: 0;
  color: #66748d;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}

.campaign-template-business-note a {
  color: #0a66c2;
  font-weight: 850;
  text-decoration: none;
}

.campaign-template-business-note a:hover {
  text-decoration: underline;
}

.campaign-filter-title {
  margin: 24px 0 14px;
}

.campaign-filter-title h3 {
  margin: 0;
  color: #102447;
  font-size: 18px;
}

.campaign-filter-title p {
  margin: 6px 0 0;
  color: #6e7b91;
  font-size: 13px;
  font-weight: 700;
}

.campaign-processing-notice {
  margin-bottom: 16px;
  border-radius: 8px;
  font-weight: 750;
}

.campaign-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 34px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.table-actions .metadata-see-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 0;
}

.metadata-see-all.danger {
  color: #dc2626;
}

.campaign-items-popup {
  width: min(1240px, calc(100vw - 36px));
}

.campaign-items-page {
  display: grid;
  gap: 22px;
}

.campaign-items-toast {
  position: fixed;
  top: 96px;
  right: 24px;
  z-index: 60;
  display: grid;
  gap: 4px;
  width: min(340px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid #86efac;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  box-shadow: 0 18px 40px rgba(22, 101, 52, 0.16);
  animation: campaign-toast-in 0.28s ease-out;
}

.campaign-items-toast strong {
  color: #14532d;
  font-size: 14px;
  font-weight: 900;
}

.campaign-items-toast span {
  color: #166534;
  font-size: 13px;
  font-weight: 750;
}

@keyframes campaign-toast-in {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.campaign-items-page .campaign-processing-notice {
  margin-left: 0;
  margin-right: 0;
}

.campaign-items-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.campaign-items-header .button {
  width: fit-content;
  grid-column: 1 / -1;
}

.campaign-items-header h1 {
  margin: 0;
  color: #0d1f3d;
  font-size: 34px;
  line-height: 1.1;
}

.campaign-items-header p {
  margin: 8px 0 0;
  color: #66748d;
  font-size: 16px;
  font-weight: 750;
}

.campaign-items-estimate {
  justify-self: end;
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, auto));
  gap: 12px;
}

.campaign-items-estimate div {
  display: grid;
  gap: 4px;
  min-width: 150px;
  padding: 12px 14px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.campaign-items-estimate span {
  color: #66748d;
  font-size: 12px;
  font-weight: 800;
}

.campaign-items-estimate strong {
  color: #0d1f3d;
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .campaign-items-header {
    grid-template-columns: 1fr;
  }

  .campaign-items-estimate {
    justify-self: stretch;
    grid-template-columns: 1fr;
  }
}

.campaign-items-toolbar {
  display: grid;
  gap: 12px;
  align-items: start;
}

.campaign-items-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.campaign-items-refreshing {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 14px;
  font-weight: 850;
}

.campaign-items-refreshing::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #2563eb;
  animation: campaign-refresh-dot 1s ease-in-out infinite;
}

.campaign-item-row-new {
  animation: campaign-row-inserted 0.58s ease-in-out;
}

@keyframes campaign-refresh-dot {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes campaign-row-inserted {
  0% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  50% {
    transform: translateX(5px);
  }

  75% {
    transform: translateX(-2px);
  }

  100% {
    transform: translateX(0);
  }
}

.campaign-items-status-filter {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.campaign-items-status-filter span {
  color: #66748d;
  font-size: 14px;
  font-weight: 850;
}

.campaign-items-status-filter div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.campaign-items-status-filter button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #ffffff;
  color: #46556f;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.campaign-items-status-filter button:hover,
.campaign-items-status-filter button.active {
  border-color: #465fff;
  background: #eef2ff;
  color: #465fff;
  box-shadow: 0 8px 18px rgba(70, 95, 255, 0.12);
}

.campaign-items-toolbar .campaign-info-alert {
  width: 100%;
  max-width: none;
  margin: 0;
  color: #92400e;
  border-color: #f59e0b;
  background: #fffbeb;
}

.campaign-items-toolbar .campaign-info-alert::before {
  color: #f59e0b;
}

.campaign-items-section {
  min-height: 360px;
}

.campaign-details-modal {
  width: min(1180px, calc(100vw - 36px));
}

.campaign-details-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
  align-items: start;
}

.campaign-details-body .campaign-preview {
  position: static;
}

.campaign-details-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.campaign-details-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.campaign-details-summary div {
  display: grid;
  gap: 6px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid #e4ebf5;
  border-radius: 8px;
  background: #ffffff;
}

.campaign-details-summary span {
  color: #66748d;
  font-size: 12px;
  font-weight: 850;
}

.campaign-details-summary strong {
  color: #102447;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.campaign-details-template-preview {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.campaign-details-template-preview .whatsapp-template-preview {
  max-width: 580px;
}

.campaign-items-table {
  max-height: 70vh;
  overflow: auto;
}

.campaign-create-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 42px;
  align-items: start;
  min-height: calc(100vh - 68px);
}

.campaign-create-main {
  min-width: 0;
  padding: 8px 0 28px;
  overflow: visible;
}

.campaign-create-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 74px;
}

.campaign-create-header h1 {
  margin: 0;
  color: #0d1f3d;
  font-size: 42px;
  line-height: 1.1;
}

.campaign-create-header p {
  margin: 22px 0 0;
  color: #66748d;
  font-size: 18px;
  font-weight: 700;
}

.campaign-create-header .button,
.campaign-actions .button {
  min-width: 132px;
  min-height: 52px;
  font-size: 16px;
}

.campaign-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 72px;
}

.campaign-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 100%;
  color: #7a8597;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 850;
  font-family: inherit;
  text-align: center;
  cursor: default;
}

.campaign-step.completed {
  cursor: pointer;
}

.campaign-step.locked {
  cursor: default;
}

.campaign-step::before,
.campaign-step::after {
  content: "";
  position: absolute;
  top: 20px;
  width: calc(50% - 31px);
  height: 2px;
  background: #e1e7f0;
}

.campaign-step::before {
  left: 0;
}

.campaign-step::after {
  right: 0;
}

.campaign-step:first-child::before,
.campaign-step:last-child::after {
  display: none;
}

.campaign-step span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #253756;
  border: 2px solid #dce3ed;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 3px 12px rgba(15, 36, 65, 0.04);
}

.campaign-step.active,
.campaign-step.completed {
  color: #0bb469;
}

.campaign-step.active span,
.campaign-step.completed span {
  color: #ffffff;
  border-color: #0bb469;
  background: #0bb469;
}

.campaign-step-content {
  min-height: 92px;
  overflow: visible;
}

.campaign-preview {
  position: sticky;
  top: 28px;
  display: grid;
  align-content: start;
  overflow: hidden;
  border: 1px solid #dfe6f1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(22, 37, 61, 0.04);
}

.campaign-preview-title {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 22px 18px;
  color: #52627b;
}

.campaign-preview-title h3 {
  margin: 0;
  color: #102447;
  font-size: 22px;
}

.campaign-preview-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 52px;
  margin: 0 22px;
  padding: 10px 0;
  border-top: 1px solid #e4ebf5;
}

.campaign-preview-row svg {
  color: #596981;
}

.campaign-preview-row p {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin: 0;
}

.campaign-preview-row span {
  color: #66748d;
  font-size: 13px;
  font-weight: 850;
}

.campaign-preview-row strong {
  color: #102447;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.campaign-preview-row small {
  color: #66748d;
  font-size: 12px;
  font-weight: 700;
}

.campaign-preview-row.highlight svg,
.campaign-preview-row.highlight strong {
  color: #0bb469;
}

.campaign-preview-row.highlight strong {
  font-size: 20px;
}

.campaign-preview-more {
  margin: 0 22px;
  padding: 8px 0;
  border-top: 1px solid #e4ebf5;
}

.campaign-preview-more button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  color: #0bb469;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.campaign-preview-more button svg {
  transition: transform 0.18s ease;
}

.campaign-preview-more.open button svg {
  transform: rotate(180deg);
}

.campaign-preview-more dl {
  display: grid;
  gap: 8px;
  margin: 4px 0 8px;
}

.campaign-preview-more dl div {
  display: grid;
  gap: 2px;
}

.campaign-preview-more dt {
  color: #66748d;
  font-size: 11px;
  font-weight: 850;
}

.campaign-preview-more dd {
  min-width: 0;
  margin: 0;
  color: #102447;
  font-size: 13px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.config-group {
  overflow: visible;
}

.required-mark {
  margin-left: 4px;
  color: #d92d20 !important;
  font-weight: 900;
}

.config-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.subaside {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dfe6f1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(22, 37, 61, 0.04);
}

.subaside-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 0 10px;
  color: #53647e;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.subaside-item.active {
  color: #102447;
  border-color: #cfe0ff;
  background: #edf4ff;
}

.subaside-item small {
  display: grid;
  min-width: 26px;
  height: 24px;
  place-items: center;
  color: #31527f;
  border-radius: 999px;
  background: #ffffff;
  font-size: 12px;
}

.config-content {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.config-group-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  padding: 0;
  color: inherit;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.config-group-toggle h2 {
  margin: 0;
  font-size: 18px;
}

.config-group-toggle p {
  margin: 5px 0 0;
  color: #6e7b91;
  font-size: 14px;
  font-weight: 700;
}

.config-group-chevron {
  flex: 0 0 auto;
  color: #52627a;
  transition: transform 160ms ease;
}

.config-group-chevron.open {
  transform: rotate(180deg);
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.config-item {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #e0e8f4;
  border-radius: 8px;
  background: #fbfcfe;
}

.config-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.config-item-header strong,
.config-item-header span,
.config-item p {
  overflow-wrap: anywhere;
}

.config-item-header strong {
  display: block;
  color: #102447;
  font-size: 15px;
}

.config-item-header span {
  display: block;
  margin-top: 4px;
  color: #708098;
  font-size: 12px;
  font-weight: 800;
}

.config-item-header small {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.source-custom {
  color: #075f3a;
  background: #dcf8e8;
}

.source-default {
  color: #31527f;
  background: #edf4ff;
}

.source-unset {
  color: #6f4f00;
  background: #fff4d8;
}

.config-item p {
  margin: 0;
  color: #6e7b91;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.config-secret-input {
  position: relative;
  display: flex;
  align-items: center;
}

.config-secret-input input {
  width: 100%;
  padding-right: 48px;
}

.config-secret-input button {
  position: absolute;
  right: 8px;
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  color: #52647f;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.config-secret-input button:hover {
  color: #102447;
  background: #eef4ff;
}

.toggle-control {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 12px 0 5px;
  color: #65758f;
  border: 1px solid #ccd7e8;
  border-radius: 999px;
  background: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.toggle-control span {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #9aa8bc;
}

.toggle-control.on {
  color: #075f3a;
  border-color: #9ee6bf;
  background: #e8fbf0;
}

.toggle-control.on span {
  background: #0bb469;
}

.toggle-control.unset {
  color: #6f4f00;
  border-color: #ffe2a3;
  background: #fff8e8;
}

.toggle-control.unset span {
  background: #d8a32d;
}

.config-save-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  padding: 14px 0 0;
  background: linear-gradient(180deg, rgba(244, 247, 251, 0), #f4f7fb 35%);
  z-index: 5;
}

.confirm-modal {
  width: min(620px, 100%);
  grid-template-rows: auto auto auto;
}

.confirm-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.confirm-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  color: #a15c00;
  border-radius: 8px;
  background: #fff4d8;
}

.confirm-body {
  display: grid;
  gap: 12px;
  min-height: 0;
  color: #253a5a;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.45;
}

.confirm-body p {
  margin: 0;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 22px;
  border-top: 1px solid #e5ebf4;
  background: #ffffff;
}

.loading,
.empty-state,
.alert,
.notice {
  padding: 18px;
  border-radius: 8px;
  font-weight: 800;
}

.loading {
  color: #2d6df6;
  background: #edf4ff;
}

.campaign-saving-backdrop {
  z-index: 1200;
}

.campaign-saving-modal {
  width: min(440px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px;
}

.campaign-saving-icon {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #465fff;
  background: #eef4ff;
}

.campaign-saving-icon svg {
  animation: campaign-saving-spin 0.9s linear infinite;
}

.campaign-saving-modal h2 {
  margin: 0 0 8px;
  color: #101828;
  font-size: 22px;
}

.campaign-saving-modal p {
  margin: 0;
  color: #667085;
  font-weight: 700;
  line-height: 1.5;
}

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

.skeleton-loader {
  display: grid;
  gap: 12px;
}

.skeleton-block {
  display: block;
  overflow: hidden;
  border-radius: 7px;
  background: linear-gradient(90deg, #eef3fa 0%, #f8fbff 46%, #eef3fa 100%);
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.25s ease-in-out infinite;
}

.skeleton-block.short {
  width: 44%;
  height: 13px;
}

.skeleton-block.medium {
  width: 68%;
  height: 15px;
}

.skeleton-block.long {
  width: 90%;
  height: 12px;
}

.skeleton-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 8px;
}

.skeleton-icon.small {
  width: 32px;
  height: 32px;
}

.skeleton-lines {
  display: grid;
  flex: 1;
  gap: 9px;
  min-width: 0;
}

.skeleton-table {
  padding: 14px;
  border: 1px solid #e2eaf5;
  border-radius: 8px;
  background: #ffffff;
}

.skeleton-table-row {
  display: grid;
  grid-template-columns: 1.2fr 2fr 0.7fr 1.1fr 0.9fr;
  gap: 18px;
  align-items: center;
  min-height: 54px;
  padding: 10px 6px;
  border-bottom: 1px solid #eef2f7;
}

.skeleton-table-row:last-child {
  border-bottom: 0;
}

.skeleton-summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.skeleton-summary-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid #e0e8f4;
  border-radius: 8px;
  background: #ffffff;
}

.skeleton-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e2eaf5;
  border-radius: 8px;
  background: #ffffff;
}

.skeleton-section .title {
  width: 180px;
  height: 20px;
}

.skeleton-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  overflow: hidden;
  border: 1px solid #e2eaf5;
  border-radius: 8px;
  background: #fbfcfe;
}

.skeleton-field-card {
  display: flex;
  gap: 10px;
  min-height: 104px;
  padding: 12px;
  border-right: 1px solid #e2eaf5;
  border-bottom: 1px solid #e2eaf5;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 120% 0;
  }

  100% {
    background-position: -120% 0;
  }
}

.empty-state {
  display: grid;
  gap: 5px;
  color: #6a7890;
  background: #f4f7fb;
}

.empty-state strong {
  color: #243451;
}

.alert {
  margin-bottom: 14px;
  color: #b4232c;
  background: #fff1f2;
}

.notice {
  color: #6f4f00;
  border: 1px solid #ffe2a3;
  background: #fff8e8;
}

.success-notice {
  color: #075f3a;
  border-color: #9ee6bf;
  background: #e8fbf0;
}

.modal-backdrop,
.details-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 23, 43, 0.58);
}

.modal,
.details-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 8px;
}

.details-backdrop {
  padding: 0;
  background: rgba(8, 23, 43, 0.45);
}

.details-modal {
  width: calc(100vw - 36px);
  height: calc(100vh - 36px);
  max-height: none;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 8px;
  background: #ffffff;
}

.details-hero {
  padding: 18px 24px 20px;
  border-bottom: 1px solid #e7edf6;
  background: #ffffff;
}

.details-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.details-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.details-title-row > .details-actions {
  display: none;
}

.details-title-row,
.details-title-block,
.details-actions,
.details-topbar-actions,
.details-summary-card,
.detail-section-title,
.metadata-item {
  display: flex;
  align-items: center;
}

.details-title-row {
  justify-content: flex-start;
  gap: 16px;
}

.details-title-block {
  gap: 14px;
  min-width: 0;
}

.details-main-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  color: #ffffff;
  border-radius: 12px;
  background: #1768f2;
  box-shadow: 0 10px 22px rgba(23, 104, 242, 0.24);
}

.details-title-block h2 {
  margin: 0;
  color: #102447;
  font-size: 34px;
  line-height: 1.05;
}

.details-title-block p {
  margin: 10px 0 0;
  color: #62718e;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.details-actions {
  align-self: start;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.details-actions .button {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.details-actions .button-primary {
  background: #095cf7;
  border-color: #095cf7;
  box-shadow: 0 8px 18px rgba(9, 92, 247, 0.2);
}

.details-close {
  width: 38px;
  height: 38px;
}

.details-content {
  min-height: 0;
  overflow: auto;
  padding: 22px 28px 34px;
  background: #fbfdff;
}

.details-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid #dfe8f5;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(24, 43, 73, 0.05);
}

.details-summary-card {
  min-height: 92px;
  gap: 14px;
  padding: 18px 22px;
  border: 0;
  border-right: 1px solid #e1e9f5;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.details-summary-card:last-child {
  border-right: 0;
}

.details-summary-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  color: #ffffff;
  border-radius: 999px;
}

.details-summary-icon.green {
  background: #20c77d;
}

.details-summary-icon.orange {
  background: #ff9d25;
}

.details-summary-icon.blue {
  background: #3d7bf4;
}

.details-summary-card span {
  display: block;
  color: #6b7891;
  font-size: 13px;
  font-weight: 800;
}

.details-summary-card strong {
  display: block;
  margin-top: 5px;
  color: #132545;
  font-size: 18px;
  line-height: 1.2;
}

.summary-value-skeleton {
  display: block;
  width: 132px;
  max-width: 100%;
  height: 22px;
  margin-top: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, #e7edf6 25%, #f5f8fc 38%, #e7edf6 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.success-text {
  color: #20c77d !important;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid #e5ebf4;
}

.modal-header h2 {
  margin: 0;
  font-size: 22px;
  color: #10213c;
}

.modal-header p {
  margin: 6px 0 0;
  color: #66748d;
  font-weight: 700;
}

.modal-body {
  min-height: 0;
  overflow: auto;
  height: 70dvh;
  padding: 20px 22px 24px;
  background: #f8fafc;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  color: #40516d;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #ffffff;
}

.icon-button:hover {
  color: #0f1f39;
  border-color: #bfd0ea;
}

.chat-compose-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.chat-compose-input-row .variable-textarea-wrap {
  min-width: 0;
}

.chat-compose-input-row .variable-textarea-editor {
  min-height: 160px;
  height: 160px;
  max-height: 240px;
}

.chat-compose-error {
  grid-column: 1 / -1;
  padding: 10px 12px;
  color: #b42318;
  border: 1px solid #fecdca;
  border-radius: 8px;
  background: #fef3f2;
  font-size: 13px;
  font-weight: 800;
}

.chat-compose-actions {
  display: grid;
  grid-template-rows: repeat(3, 48px);
  align-content: end;
  justify-items: center;
  gap: 8px;
}

.chat-compose-action-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #d9e2ef;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 36, 65, 0.08);
  color: #40516d;
  cursor: pointer;
}

.chat-compose-action-button:hover:not(:disabled) {
  color: #2444ff;
  border-color: #b9c7ff;
  background: #f5f7ff;
}

.chat-compose-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.chat-compose-action-button.media {
  width: 42px;
  height: 42px;
}

.chat-compose-action-button.send {
  width: 48px;
  height: 48px;
}

@media (max-width: 640px) {
  .chat-compose-input-row {
    grid-template-columns: minmax(0, 1fr) 50px;
    gap: 8px;
  }

  .chat-compose-input-row .variable-textarea-editor {
    min-height: 138px;
    height: 138px;
  }

  .chat-compose-actions {
    grid-template-rows: repeat(3, 42px);
    gap: 6px;
  }

  .chat-compose-action-button.media {
    width: 38px;
    height: 38px;
  }

  .chat-compose-action-button.send {
    width: 44px;
    height: 44px;
  }
}

.modal-sections {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 22px;
}

.modal-sections > .detail-section:nth-child(n + 3) {
  grid-column: 1 / -1;
}

.debtor-modal-sections {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.debtor-modal-sections > .detail-section:nth-child(n),
.debtor-modal-sections > .debtor-modal-left-column {
  grid-column: auto;
}

.debtor-modal-left-column {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.detail-section {
  padding: 20px 22px;
  border: 1px solid #e0e8f4;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(23, 38, 64, 0.035);
}

.detail-section-title {
  position: relative;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 16px;
  border-bottom: 0;
}

.detail-section-title span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #1768f2;
  border-radius: 10px;
  background: #edf4ff;
  box-shadow: inset 0 -3px 0 #1768f2;
}

.detail-section h3 {
  margin: 0;
  color: #10213c;
  font-size: 20px;
}

.detail-section-title::after {
  content: "";
  position: absolute;
  left: 44px;
  bottom: 6px;
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: #1768f2;
}

.nested-item h4 {
  margin: 0 0 10px;
  color: #10213c;
  font-size: 14px;
}

.nested-list {
  display: grid;
  gap: 10px;
}

.list-summary {
  margin-bottom: 8px;
  color: #6b7891;
  font-size: 12px;
  font-weight: 800;
}

.list-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.list-pagination span {
  color: #52617a;
  font-size: 12px;
  font-weight: 800;
}

.nested-item {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid #e2eaf5;
  border-radius: 8px;
  background: #fbfcfe;
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.metadata-item {
  align-items: flex-start;
  min-height: 96px;
  gap: 14px;
  padding: 14px 18px;
  min-width: 0;
  background: transparent;
  box-shadow: none;
}

.metadata-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  color: #1768f2;
  border-radius: 999px;
  background: #edf4ff;
}

.metadata-item span {
  display: block;
  color: #294268;
  font-size: 12px;
  font-weight: 900;
}

.metadata-item strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  word-break: normal;
  color: #102447;
  font-size: 15px;
  line-height: 1.22;
}

.metadata-item small {
  display: block;
  margin-top: 7px;
  color: #687891;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.metadata-value-list {
  margin: 7px 0 0 18px;
  padding: 0;
  color: #102447;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.metadata-value-list li {
  margin-bottom: 5px;
  overflow-wrap: anywhere;
}

.metadata-see-all {
  margin-top: 6px;
  padding: 0;
  color: #1768f2;
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.metadata-see-all:hover {
  text-decoration: underline;
}

.other-debts-panel {
  display: grid;
  gap: 12px;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid #e2eaf5;
  border-radius: 8px;
  background: #fbfdff;
}

.other-debts-panel > strong,
.other-debts-header strong {
  position: relative;
  display: block;
  width: fit-content;
  padding-bottom: 12px;
  color: #102447;
  font-size: 18px;
}

.other-debts-panel > strong::after,
.other-debts-header strong::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: #1768f2;
}

.other-debts-panel p,
.other-debts-header span {
  margin: 4px 0 0;
  color: #687891;
  font-size: 13px;
  font-weight: 750;
}

.other-debts-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.other-debts-list {
  display: grid;
  gap: 10px;
}

.other-debts-list.full {
  max-height: 68vh;
  padding: 16px 16px 42px;
  overflow: auto;
  scroll-padding-bottom: 42px;
}

.other-debt-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 12px;
  border: 1px solid #e5edf7;
  border-radius: 7px;
  background: #ffffff;
}

.other-debt-item > div {
  min-width: 0;
}

.other-debt-item strong {
  display: block;
  color: #102447;
  font-size: 14px;
  line-height: 1.25;
}

.other-debt-item span {
  display: block;
  margin-top: 5px;
  color: #294268;
  font-size: 13px;
  font-weight: 850;
}

.other-debt-item small {
  display: block;
  margin-top: 6px;
  color: #687891;
  font-size: 12px;
  font-weight: 750;
}

.other-debt-item .metadata-see-all,
.other-debts-header .metadata-see-all {
  flex: 0 0 auto;
  margin-top: 0;
}

.other-debts-popup {
  width: min(760px, calc(100vw - 36px));
}

.other-debt-details-popup {
  width: min(1180px, calc(100vw - 36px));
}

.other-debt-details-popup > .detail-section {
  max-height: 74vh;
  overflow: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.list-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(10, 24, 44, 0.42);
}

.list-popup {
  width: min(760px, 100%);
  max-height: min(720px, 88vh);
  overflow: hidden;
  border-radius: 10px;
}

.list-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid #e2eaf5;
}

.list-popup-header h3 {
  margin: 0;
  color: #102447;
  font-size: 18px;
}

.list-popup-header p {
  margin: 5px 0 0;
  color: #748199;
  font-size: 13px;
  font-weight: 700;
}

.list-popup-items {
  max-height: calc(min(720px, 88vh) - 82px);
  margin: 0;
  padding: 18px 28px 22px 42px;
  overflow: auto;
  color: #102447;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.list-popup-items li {
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.google-search-popup {
  width: min(1180px, calc(100vw - 48px));
}

.google-search-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.google-search-sections {
  display: grid;
  gap: 22px;
  max-height: calc(min(760px, 88vh) - 88px);
  padding: 22px;
  overflow: auto;
}

.google-search-section {
  display: grid;
  gap: 12px;
}

.google-search-section h4 {
  position: relative;
  width: fit-content;
  margin: 0;
  padding-bottom: 10px;
  color: #102447;
  font-size: 17px;
  font-weight: 950;
}

.google-search-section h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 32px;
  height: 3px;
  border-radius: 999px;
  background: #1768f2;
}

.google-search-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin: 0;
}

.google-search-details > div {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 96px;
  padding: 16px;
  border: 1px solid #e2eaf5;
  border-radius: 8px;
  background: #fbfdff;
}

.google-search-detail-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: #1768f2;
  border-radius: 999px;
  background: #edf4ff;
}

.google-search-details > div > div {
  min-width: 0;
}

.google-search-details dt {
  color: #687891;
  font-size: 12px;
  font-weight: 900;
}

.google-search-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: #102447;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.google-payload-link {
  display: inline-grid;
  width: fit-content;
  max-width: 100%;
  gap: 2px;
  padding: 7px 11px;
  color: #1768f2;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #edf4ff;
  text-decoration: none;
}

.google-payload-link:hover {
  border-color: #1768f2;
}

.google-payload-link span,
.google-payload-link small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.google-payload-link span {
  font-size: 13px;
  font-weight: 900;
}

.google-payload-link small {
  color: #687891;
  font-size: 11px;
  font-weight: 800;
}

.google-payload-phone-link {
  display: inline-block;
  width: fit-content;
  color: #102447;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.google-payload-phone-link:hover {
  color: #1768f2;
  border-bottom-color: #1768f2;
}

.google-payload-image {
  display: grid;
  gap: 8px;
}

.google-payload-image img {
  width: 100%;
  max-height: 210px;
  object-fit: cover;
  border: 1px solid #e2eaf5;
  border-radius: 8px;
  background: #eef3f8;
}

.google-payload-list,
.google-payload-object {
  display: grid;
  gap: 8px;
}

.google-payload-list > span,
.google-payload-object > div {
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.google-payload-object > div > span {
  display: block;
  margin-bottom: 2px;
  color: #687891;
  font-size: 12px;
  font-weight: 900;
}

.google-payload-object > div > strong {
  display: block;
  color: #102447;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.google-payload-more-button {
  width: fit-content;
  margin-top: 8px;
  font-size: 13px;
}

.google-payload-more-backdrop {
  z-index: 95;
  background: rgba(10, 24, 44, 0.28);
}

.google-payload-more-popup {
  width: min(760px, calc(100vw - 56px));
}

.google-payload-more-content {
  max-height: calc(min(720px, 88vh) - 82px);
  padding: 20px;
  overflow: auto;
}

.google-match-details-backdrop {
  z-index: 105;
}

.google-match-details-popup {
  width: min(920px, calc(100vw - 56px));
}

.match-details-sections {
  display: grid;
  gap: 16px;
  max-height: calc(min(720px, 88vh) - 82px);
  padding: 20px;
  overflow: auto;
}

.match-details-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e2eaf5;
  border-radius: 8px;
  background: #fbfdff;
}

.match-details-section h4 {
  margin: 0;
  color: #102447;
  font-size: 16px;
  font-weight: 950;
}

.match-details-section dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 0;
}

.match-details-section dl div {
  min-width: 0;
}

.match-details-section dt {
  color: #687891;
  font-size: 12px;
  font-weight: 900;
}

.match-details-section dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: #102447;
  font-size: 14px;
  font-weight: 850;
}

.popular-times-table-wrap {
  overflow: auto;
  border: 1px solid #e2eaf5;
  border-radius: 8px;
}

.popular-times-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.popular-times-table th,
.popular-times-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #edf1f7;
  color: #102447;
  font-size: 14px;
  font-weight: 800;
  vertical-align: top;
}

.popular-times-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #687891;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 900;
}

.popular-times-table tr:last-child td {
  border-bottom: 0;
}

.popular-times-view-button {
  margin-top: 0;
  font-size: 13px;
}

.popular-times-movement-backdrop {
  z-index: 110;
}

.popular-times-movement-popup {
  width: min(520px, calc(100vw - 56px));
}

.movement-summary {
  display: grid;
  gap: 12px;
}

.movement-summary > div {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid #e2eaf5;
  border-radius: 8px;
  background: #fbfdff;
}

.movement-summary span {
  color: #687891;
  font-size: 12px;
  font-weight: 900;
}

.movement-summary strong {
  color: #102447;
  font-size: 16px;
  font-weight: 900;
}

.contacts-popup {
  width: min(560px, 100%);
}

.contact-links-list {
  display: grid;
  gap: 12px;
  max-height: calc(min(720px, 88vh) - 82px);
  padding: 20px;
  overflow: auto;
}

.contact-links-list a,
.contact-links-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 14px;
  color: inherit;
  border: 1px solid #e2eaf5;
  border-radius: 8px;
  background: #fbfdff;
  text-decoration: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.contact-links-list a:hover {
  border-color: #1768f2;
  box-shadow: 0 10px 26px rgba(23, 104, 242, 0.12);
  transform: translateY(-1px);
}

.contact-links-list strong,
.contact-links-list small,
.contact-links-list .metadata-see-all {
  display: block;
}

.contact-links-list strong {
  color: #102447;
  font-size: 15px;
  font-weight: 900;
}

.contact-links-list small {
  margin-top: 4px;
  color: #687891;
  font-size: 13px;
  font-weight: 800;
}

.contact-links-list .metadata-see-all {
  width: fit-content;
  margin-top: 6px;
  font-size: 14px;
}

.metadata-item small {
  display: block;
  margin-top: 6px;
  color: #748199;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.empty-state.compact {
  padding: 12px;
  font-size: 14px;
}

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f6f8fb;
}

.error-page .panel {
  width: min(520px, 100%);
}

.error-page h1 {
  margin: 0 0 10px;
}

.error-page p {
  margin: 0 0 18px;
  color: #6e7b91;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .nav-menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sidebar-footer {
    display: none;
  }

  .details-grid,
  .details-summary,
  .stats-grid,
  .debtor-modal-sections,
  .modal-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .campaign-create-page {
    grid-template-columns: 1fr;
  }

  .campaign-template-step {
    grid-template-columns: 1fr;
  }

  .campaign-preview {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .campaign-preview-title {
    grid-column: 1 / -1;
  }

  .details-title-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .content {
    padding: 20px;
  }

  .panel-header {
    display: grid;
  }

  .page-header h1 {
    font-size: 26px;
  }

  .nav-menu,
  .campaign-create-page,
  .details-grid,
  .details-summary,
  .stats-grid,
    .metadata-grid,
    .debtor-modal-sections,
    .modal-sections,
  .filter-grid,
  .auth-form-grid,
  .admin-filter-panel,
  .campaign-form-grid,
  .campaign-filter-grid,
  .campaign-template-step,
  .config-layout,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .campaign-create-header {
    display: grid;
    margin-bottom: 36px;
  }

  .campaign-create-header h1 {
    font-size: 32px;
  }

  .campaign-create-header p {
    margin-top: 12px;
    font-size: 15px;
  }

  .campaign-steps {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 36px;
  }

  .campaign-step {
    min-width: 92px;
  }

  .campaign-step::before,
  .campaign-step::after {
    display: none;
  }

  .campaign-preview {
    position: static;
    grid-template-columns: 1fr;
  }

  .campaign-details-body,
  .campaign-details-summary {
    grid-template-columns: 1fr;
  }

  .modal-sections > .detail-section:nth-child(n) {
    grid-column: auto;
  }

  .subaside {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  .filter-popup-backdrop {
    padding: 0;
  }

  .filter-popup {
    width: 100vw;
    height: 100vh;
    max-height: none;
    border-radius: 0;
  }

  .filter-popup-actions {
    flex-direction: column-reverse;
  }

  .details-backdrop {
    padding: 0;
  }

  .details-modal {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }

  .details-hero,
  .details-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .details-main-icon {
    width: 46px;
    height: 46px;
  }

  .details-title-block h2 {
    font-size: 24px;
  }

  .details-title-block p {
    font-size: 13px;
  }

  .metadata-item {
    min-height: auto;
  }

  .pagination {
    justify-content: stretch;
  }

  .pagination .button {
    flex: 1;
  }
}
.official-chat-wrapper .body-wrapper { min-height: 100vh; }
.button-danger { color: #fff; border: 1px solid #d92d20; background: #d92d20; }


.button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: spinner-spin 0.75s linear infinite;
}

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


