/* ThemeBot Professional Styles */

:root {
  --bot-primary: #25d366;
  --bot-primary-dark: #128c7e;
  --bot-gradient: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

/* Brand */
.bot-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bot-gradient);
  color: #fff;
  font-size: 1.25rem;
}

.bot-brand-icon.large {
  width: 64px;
  height: 64px;
  font-size: 2rem;
  border-radius: 16px;
}

/* Stat cards */
.bot-stat-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  box-shadow: 0 2px 6px rgba(67, 89, 113, 0.08);
}

.bot-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(67, 89, 113, 0.12);
}

.bot-stat-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.bot-stat-card h3,
.bot-stat-card h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.reply-preview,
.bot-wa-preview {
  white-space: normal;
  line-height: 1.5;
  min-height: 3rem;
}

.bot-wa-preview strong {
  font-weight: 700;
}

.bot-wa-preview code {
  font-family: ui-monospace, monospace;
  background: rgba(67, 89, 113, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.bot-welcome-card {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.08) 0%, rgba(18, 140, 126, 0.04) 100%);
  border: 1px solid rgba(37, 211, 102, 0.15);
}

/* Auto-replies page */
.bot-replies-page .bot-replies-hero {
  border: none;
  box-shadow: 0 2px 8px rgba(67, 89, 113, 0.06);
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.06) 0%, #fff 55%);
}

.bot-reply-editor-card.sticky-lg-top {
  top: 5.5rem;
  z-index: 10;
}

.bot-reply-form .bot-form-block {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(67, 89, 113, 0.08);
}

.bot-reply-form .bot-form-block:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.bot-form-details {
  margin-bottom: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(67, 89, 113, 0.03);
  border: 1px dashed rgba(67, 89, 113, 0.12);
}

.bot-form-details summary {
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #566a7f;
  list-style: none;
}

.bot-form-details summary::-webkit-details-marker {
  display: none;
}

.bot-form-details[open] summary {
  margin-bottom: 0.25rem;
}

.btn-xs.btn-soft {
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(105, 108, 255, 0.2);
  background: rgba(105, 108, 255, 0.06);
  color: #696cff;
}

.btn-xs.btn-soft:hover {
  background: rgba(105, 108, 255, 0.12);
  color: #5f61e6;
}

.bot-wa-textarea {
  font-size: 0.9rem;
  line-height: 1.5;
  border-radius: 10px;
}

.bot-wa-bubble {
  position: relative;
  padding: 0.75rem 0.9rem;
  border-radius: 0 12px 12px 12px;
  background: #e7fce3;
  color: #1f2d1d;
  font-size: 0.8125rem;
  line-height: 1.45;
  white-space: pre-wrap;
  box-shadow: inset 0 0 0 1px rgba(37, 211, 102, 0.15);
}

.bot-wa-bubble::before {
  content: '';
  position: absolute;
  top: 0;
  left: -6px;
  width: 0;
  height: 0;
  border-top: 6px solid #e7fce3;
  border-left: 6px solid transparent;
}

.bot-wa-bubble--compact {
  font-size: 0.78rem;
  max-height: 4.5rem;
  overflow: hidden;
  margin-left: 6px;
}

.bot-reply-group-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.bot-reply-card {
  border: none;
  box-shadow: 0 2px 6px rgba(67, 89, 113, 0.07);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.bot-reply-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #696cff;
}

.bot-reply-card {
  position: relative;
}

.bot-reply-card--imprenta::before { background: #25d366; }
.bot-reply-card--web::before { background: #03c3ec; }
.bot-reply-card--contacto::before { background: #ffab00; }
.bot-reply-card--general::before { background: #696cff; }

.bot-reply-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(67, 89, 113, 0.1);
}

.bot-reply-card--active {
  box-shadow: 0 0 0 2px rgba(105, 108, 255, 0.35), 0 4px 12px rgba(67, 89, 113, 0.1);
}

.bot-reply-card--paused {
  opacity: 0.72;
}

.bot-trigger-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.bot-trigger-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  border-radius: 999px;
  background: rgba(67, 89, 113, 0.08);
  color: #566a7f;
}

.bot-replies-empty .bot-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(37, 211, 102, 0.1);
  color: var(--bot-primary-dark);
  font-size: 1.75rem;
}

.bot-wa-menu-preview {
  font-size: 0.8125rem;
  line-height: 1.5;
}

.bot-wa-menu-line {
  margin-top: 0.25rem;
}

.bot-wa-menu-num {
  font-weight: 700;
  color: #128c7e;
}

.bot-wa-menu-hint {
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: #8592a3;
  font-style: italic;
}

.bot-wa-menu-hint {
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: #8592a3;
  font-style: italic;
}

/* Campaigns */
.bot-campaign-hero {
  border: none;
  background: linear-gradient(135deg, rgba(105, 108, 255, 0.08) 0%, rgba(37, 211, 102, 0.06) 100%);
}

.bot-campaign-hero-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #696cff;
  margin-bottom: 0.35rem;
}

.bot-campaign-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(67, 89, 113, 0.12);
  font-size: 0.8125rem;
  font-weight: 500;
}

.bot-campaign-pill--success {
  border-color: rgba(37, 211, 102, 0.25);
  background: rgba(37, 211, 102, 0.08);
  color: #1f8f4e;
}

.bot-campaign-pill--warning {
  border-color: rgba(255, 171, 0, 0.25);
  background: rgba(255, 171, 0, 0.08);
  color: #b78103;
}

.bot-campaign-stat {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(67, 89, 113, 0.08);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.bot-campaign-stat strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.2;
}

.bot-campaign-stat span {
  font-size: 0.78rem;
  color: #8592a3;
}

.bot-campaign-step {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(105, 108, 255, 0.12);
  color: #696cff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.bot-campaign-section {
  margin-bottom: 1.25rem;
}

.bot-campaign-item {
  border: 1px solid rgba(67, 89, 113, 0.1);
  transition: box-shadow 0.15s ease;
}

.bot-campaign-item:hover {
  box-shadow: 0 0.25rem 1rem rgba(67, 89, 113, 0.08);
}

.bot-campaign-item--draft {
  border-left: 4px solid #696cff;
}

.bot-campaign-item-message {
  background: rgba(67, 89, 113, 0.04);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.bot-campaign-item-actions {
  min-width: 160px;
}

.bot-wa-preview {
  background: #e5ddd5;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.bot-wa-preview-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  background: #075e54;
  color: #fff;
}

.bot-wa-preview-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.bot-wa-preview-body {
  min-height: 220px;
  padding: 1rem;
  background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 12px 12px;
}

.bot-wa-preview-bubble {
  max-width: 88%;
  background: #fff;
  border-radius: 0 12px 12px 12px;
  padding: 0.65rem 0.8rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.bot-wa-preview-time {
  font-size: 0.68rem;
  color: #8592a3;
  text-align: right;
  margin-top: 0.35rem;
}

.bot-wa-preview-images img {
  width: 100%;
  border-radius: 8px;
}

.bot-campaign-sending-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 35, 0.55);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.bot-campaign-sending-box {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.15);
}

.bot-campaigns-page .bot-audience-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bot-audience-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(67, 89, 113, 0.12);
  border-radius: 10px;
  cursor: pointer;
  margin: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.bot-audience-option:has(input:checked) {
  border-color: rgba(105, 108, 255, 0.45);
  background: rgba(105, 108, 255, 0.05);
}

.bot-audience-option input {
  margin-top: 0.2rem;
}

.bot-campaign-picker {
  border: 1px solid rgba(67, 89, 113, 0.12);
  border-radius: 12px;
  padding: 0.75rem;
  background: rgba(67, 89, 113, 0.02);
  display: none;
}

.bot-campaign-picker.bot-campaign-picker--active {
  display: block;
}

.bot-campaign-picker-list {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bot-campaign-contact {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(67, 89, 113, 0.1);
  background: #fff;
  cursor: pointer;
  margin: 0;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.bot-campaign-contact:hover {
  background: rgba(67, 89, 113, 0.03);
  border-color: rgba(67, 89, 113, 0.16);
}

.bot-campaign-contact:has(input:checked) {
  background: rgba(37, 211, 102, 0.08);
  border-color: rgba(37, 211, 102, 0.28);
  box-shadow: 0 0 0 1px rgba(37, 211, 102, 0.08);
}

.bot-campaign-contact--disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.bot-campaign-contact-photo {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.bot-campaign-contact-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(37, 211, 102, 0.25);
}

.bot-campaign-contact-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}

.bot-campaign-contact-avatar.small {
  width: 32px;
  height: 32px;
  font-size: 0.8rem;
}

.bot-avatar-hue-0 { background: linear-gradient(135deg, #696cff, #8b8dff); }
.bot-avatar-hue-1 { background: linear-gradient(135deg, #03c3ec, #3dd5f3); }
.bot-avatar-hue-2 { background: linear-gradient(135deg, #71dd37, #9de65c); }
.bot-avatar-hue-3 { background: linear-gradient(135deg, #ffab00, #ffc94d); }
.bot-avatar-hue-4 { background: linear-gradient(135deg, #ff3e1d, #ff7558); }
.bot-avatar-hue-5 { background: linear-gradient(135deg, #8592a3, #a8b3c1); }

.bot-campaign-contact-wa {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  border: 2px solid #fff;
}

.bot-campaign-contact-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.bot-campaign-contact-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.bot-campaign-contact-phone {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: #566a7f;
  font-size: 0.88rem;
}

.bot-campaign-contact-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
}

.bot-campaign-contact-raw {
  font-size: 0.72rem;
  color: #8592a3;
  background: rgba(67, 89, 113, 0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.bot-audience-preview {
  border: 1px dashed rgba(105, 108, 255, 0.25);
  border-radius: 12px;
  padding: 0.75rem;
  background: rgba(105, 108, 255, 0.03);
}

.bot-audience-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.bot-audience-preview-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 220px;
  overflow-y: auto;
}

.bot-audience-preview-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(67, 89, 113, 0.08);
}

.bot-audience-preview-item .bot-campaign-contact-photo {
  width: 40px;
  height: 40px;
}

.bot-audience-preview-item .bot-campaign-contact-img,
.bot-audience-preview-item .bot-campaign-contact-avatar {
  width: 40px;
  height: 40px;
  font-size: 0.85rem;
}

.bot-audience-preview-empty {
  text-align: center;
  color: #8592a3;
  font-size: 0.82rem;
  padding: 0.75rem 0.5rem;
}

.bot-message-editor {
  border: 1px solid rgba(67, 89, 113, 0.14);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.bot-message-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid rgba(67, 89, 113, 0.1);
  background: rgba(67, 89, 113, 0.03);
}

.bot-message-tool {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #566a7f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.bot-message-tool:hover {
  background: rgba(105, 108, 255, 0.12);
  color: #696cff;
}

.bot-message-tool.bot-message-emoji {
  width: auto;
  min-width: 32px;
  padding: 0 0.35rem;
  font-size: 1rem;
}

.bot-message-tool-sep {
  width: 1px;
  height: 20px;
  background: rgba(67, 89, 113, 0.15);
  margin: 0 0.15rem;
}

.bot-message-textarea {
  border: none;
  border-radius: 0;
  resize: vertical;
  min-height: 160px;
  font-size: 0.92rem;
  line-height: 1.5;
  box-shadow: none !important;
}

.bot-message-textarea:focus {
  border: none;
  box-shadow: none !important;
}

.bot-message-hints {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-top: 1px solid rgba(67, 89, 113, 0.08);
  font-size: 0.75rem;
  color: #697a8d;
  background: rgba(67, 89, 113, 0.02);
}

.bot-wa-preview-text {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}

.bot-wa-preview-text code.wa-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.1rem 0.25rem;
  border-radius: 4px;
  font-size: 0.85em;
}

.bot-campaign-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

.bot-campaign-image-preview img {
  aspect-ratio: 1;
  object-fit: cover;
}

.bot-campaign-deliveries summary {
  cursor: pointer;
  color: var(--bs-primary);
  user-select: none;
}

.bot-campaign-deliveries summary:hover {
  text-decoration: underline;
}

.bot-campaign-delivery-table {
  font-size: 0.8125rem;
  background: rgba(67, 89, 113, 0.04);
  border-radius: 8px;
}

.bot-campaign-delivery-table th,
.bot-campaign-delivery-table td {
  padding: 0.35rem 0.5rem;
  vertical-align: top;
}

/* Legacy reply sections (removed from UI but keep minimal) */
.bot-reply-section {
  border: none;
  border-radius: 0;
  background: transparent;
}

.bot-reply-category-block + .bot-reply-category-block {
  border-top: none;
}

/* Sidebar */
.bot-sidebar-footer {
  border-top: 1px solid rgba(67, 89, 113, 0.1);
  margin-top: auto;
}

.bot-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffab00;
  display: inline-block;
  animation: bot-pulse 2s infinite;
}

.bot-status-dot.online {
  background: #25d366;
}

.bot-status-dot.offline {
  background: #ff3e1d;
  animation: none;
}

@keyframes bot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Navbar / topbar */
.bot-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(67, 89, 113, 0.1);
  box-shadow: 0 1px 0 rgba(67, 89, 113, 0.04);
  min-height: 4.25rem;
  padding: 0;
}

.bot-topbar-inner {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.bot-topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.bot-topbar-start {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.bot-topbar-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  color: #566a7f;
  background: rgba(67, 89, 113, 0.06);
  text-decoration: none;
  flex-shrink: 0;
}

.bot-topbar-menu:hover {
  background: rgba(37, 211, 102, 0.12);
  color: var(--bot-primary-dark);
}

.bot-topbar-titles {
  min-width: 0;
}

.bot-topbar-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: #384551;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-topbar-crumb {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #a1acb8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-topbar-end {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.bot-wa-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 50px;
  background: rgba(37, 211, 102, 0.1);
  color: #128c7e;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(37, 211, 102, 0.18);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.bot-wa-status:hover {
  background: rgba(37, 211, 102, 0.16);
  color: #0f6b60;
  border-color: rgba(37, 211, 102, 0.28);
}

.bot-wa-status.offline {
  background: rgba(255, 62, 29, 0.08);
  color: #ff3e1d;
  border-color: rgba(255, 62, 29, 0.15);
}

.bot-wa-status.offline:hover {
  background: rgba(255, 62, 29, 0.12);
  color: #e8381a;
}

.bot-user-dropdown .dropdown-toggle::after {
  display: none;
}

.bot-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.65rem 0.35rem 0.35rem;
  border: 1px solid rgba(67, 89, 113, 0.12);
  border-radius: 50px;
  background: #fff;
  color: #566a7f;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bot-user-btn:hover,
.bot-user-btn:focus,
.bot-user-btn.show {
  border-color: rgba(37, 211, 102, 0.35);
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.1);
  color: #384551;
}

.bot-user-name {
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-user-menu {
  min-width: 12rem;
  border: 1px solid rgba(67, 89, 113, 0.1);
  box-shadow: 0 8px 24px rgba(67, 89, 113, 0.12);
  border-radius: 12px;
  padding: 0.35rem;
}

.bot-user-menu .dropdown-header {
  padding: 0.65rem 0.85rem 0.5rem;
}

.bot-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bot-gradient);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.breadcrumb {
  font-size: 0.8rem;
}

/* Alerts */
.bot-alert {
  border: none;
  border-left: 4px solid;
}

.alert-success.bot-alert { border-left-color: #71dd37; }
.alert-danger.bot-alert { border-left-color: #ff3e1d; }
.alert-warning.bot-alert { border-left-color: #ffab00; }
.alert-info.bot-alert { border-left-color: #03c3ec; }

/* QR */
.qr-box {
  min-height: 280px;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(37, 211, 102, 0.3);
  border-radius: 12px;
  background: rgba(37, 211, 102, 0.03);
}

.bot-qr-image {
  max-width: 260px;
  border-radius: 8px;
}

.bot-contact-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bot-gradient);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.bot-contact-avatar.small {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.bot-contacts-card .card-header,
.bot-contacts-add-card .card-header {
  background: #fff;
}

.bot-quote-offer:last-child {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  border-bottom: none !important;
}

.bot-quotes-page .accordion-button {
  font-size: 0.92rem;
}

.bot-quote-editor-card {
  top: 5.5rem;
  z-index: 2;
}

.bot-quote-tier-item {
  border: 1px solid rgba(67, 89, 113, 0.12);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 0.65rem;
  background: #fafbfc;
}

.bot-quote-tier-item:last-child {
  margin-bottom: 0;
}

.bot-quote-tier-item input[type="number"] {
  min-width: 0;
}

.bot-quotes-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #8592a3;
}

.bot-quote-row-muted {
  opacity: 0.65;
}

.bot-contacts-search {
  max-width: 300px;
}

.bot-contacts-table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8592a3;
  font-weight: 600;
  border-bottom-width: 1px;
  white-space: nowrap;
}

.bot-contacts-table tbody tr[data-contact-row]:hover {
  background: rgba(37, 211, 102, 0.04);
}

.bot-contact-edit-row > td {
  border-top: none;
}

.bot-phone-cell {
  min-width: 180px;
}

.bot-phone-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bot-phone-flag {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.bot-phone-flag--lid {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.15);
  color: #128c7e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.bot-phone-number {
  font-weight: 600;
  font-size: 0.9rem;
  color: #566a7f;
  letter-spacing: 0.01em;
}

.bot-phone-region {
  display: inline-block;
  margin-top: 0.2rem;
  margin-left: 1.65rem;
  font-size: 0.72rem;
  color: #8592a3;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.bot-phone-region--lid {
  margin-left: 1.85rem;
  color: #128c7e;
}

.bot-phone-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.bot-phone-example {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
}

/* Tables */
.table td {
  vertical-align: middle;
}

.message-preview {
  max-width: 280px;
  white-space: pre-wrap;
  font-size: 0.8125rem;
  color: #697a8d;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.table-hover tbody tr:hover {
  background-color: rgba(37, 211, 102, 0.04);
}

/* Reply editor */
.reply-editor-toolbar .btn {
  width: 36px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.reply-variable-select {
  width: 132px;
}

.reply-preview {
  min-height: 48px;
  white-space: pre-wrap;
}

.list-group-item.active small,
.list-group-item.active .text-muted {
  color: inherit !important;
}

/* Connection steps */
.bot-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.bot-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.bot-step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bot-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.bot-info-box {
  padding: 0.75rem 1rem;
  background: rgba(67, 89, 113, 0.04);
  border-radius: 8px;
}

/* Settings */
.bot-system-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(67, 89, 113, 0.08);
}

.bot-system-list li:last-child {
  border-bottom: none;
}

.bot-tip-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Login */
.bot-login-body {
  margin: 0;
  min-height: 100vh;
}

.bot-login-wrapper {
  display: flex;
  min-height: 100vh;
}

.bot-login-hero {
  flex: 1;
  background: var(--bot-gradient);
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.bot-login-hero-content {
  max-width: 420px;
}

.bot-login-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bot-login-features li {
  color: rgba(255, 255, 255, 0.9);
  padding: 0.6rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bot-login-features li i {
  font-size: 1.25rem;
  opacity: 0.8;
}

.bot-login-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: #f5f5f9;
}

.bot-login-card {
  max-width: 420px;
  width: 100%;
  border: none;
  box-shadow: 0 4px 24px rgba(67, 89, 113, 0.12);
}

/* Cards general */
.card {
  border: none;
  box-shadow: 0 2px 6px rgba(67, 89, 113, 0.06);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid rgba(67, 89, 113, 0.08);
}

/* Progress bars */
.progress-bar {
  background: var(--bot-gradient);
}

.bot-brand-icon.small {
  width: 32px;
  height: 32px;
  font-size: 1rem;
  border-radius: 8px;
}

/* Landing page */
.bot-landing-body {
  background: #fff;
  color: #566a7f;
}

.bot-landing-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(67, 89, 113, 0.08);
}

.bot-landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.bot-landing-hero {
  padding: 4rem 0 5rem;
  background: linear-gradient(180deg, rgba(37, 211, 102, 0.06) 0%, #fff 100%);
}

.bot-landing-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  background: rgba(37, 211, 102, 0.12);
  color: #128c7e;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.bot-landing-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #233446;
  margin-bottom: 1.25rem;
}

.bot-landing-title span {
  background: var(--bot-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bot-landing-lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #697a8d;
  max-width: 520px;
}

.bot-landing-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.9rem;
  color: #697a8d;
}

.bot-landing-trust i {
  color: #25d366;
  margin-right: 0.25rem;
}

.bot-landing-mockup {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(67, 89, 113, 0.15);
  overflow: hidden;
  border: 1px solid rgba(67, 89, 113, 0.08);
}

.bot-mockup-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: #f8f9fa;
  border-bottom: 1px solid rgba(67, 89, 113, 0.08);
}

.bot-mockup-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(67, 89, 113, 0.06);
}

.bot-mockup-stat {
  text-align: center;
  padding: 0.5rem;
  background: rgba(37, 211, 102, 0.05);
  border-radius: 8px;
}

.bot-mockup-stat span {
  display: block;
  font-weight: 700;
  font-size: 1.1rem;
  color: #233446;
}

.bot-mockup-stat small {
  color: #697a8d;
  font-size: 0.7rem;
}

.bot-mockup-chat {
  padding: 1.25rem;
  background: #e5ddd5;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.bot-mockup-bubble {
  max-width: 80%;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
}

.bot-mockup-bubble.in {
  background: #fff;
  align-self: flex-start;
  border-top-left-radius: 0;
}

.bot-mockup-bubble.auto,
.bot-mockup-bubble.out {
  background: #dcf8c6;
  align-self: flex-end;
  border-top-right-radius: 0;
}

.bot-landing-section {
  padding: 5rem 0;
}

.bot-landing-section-alt {
  background: #f8f9fb;
}

.bot-section-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #233446;
}

.bot-feature-card {
  height: 100%;
  padding: 1.75rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(67, 89, 113, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bot-landing-section-alt .bot-feature-card {
  background: #fff;
}

.bot-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(67, 89, 113, 0.1);
}

.bot-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.bot-feature-card h5 {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.bot-landing-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.bot-landing-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(67, 89, 113, 0.08);
}

.bot-landing-cta {
  padding: 4rem 0;
  background: var(--bot-gradient);
}

.bot-landing-footer {
  border-top: 1px solid rgba(67, 89, 113, 0.08);
  background: #fff;
}

@media (max-width: 767.98px) {
  .bot-landing-hero {
    padding: 2.5rem 0 3rem;
  }

  .bot-landing-section {
    padding: 3rem 0;
  }

  .bot-mockup-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767.98px) {
  .bot-topbar-inner {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .bot-topbar-title {
    font-size: 1.05rem;
  }

  .bot-topbar-crumb {
    display: none;
  }

  .bot-wa-status [data-navbar-status-label] {
    display: none;
  }

  .bot-user-name {
    display: none;
  }

  .bot-user-btn {
    padding: 0.25rem;
    border-radius: 50%;
  }
}

.bot-template-library .card-header h5 {
  font-size: 1.05rem;
}

.bot-template-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.bot-template-filter {
  border: 1px solid rgba(67, 89, 113, 0.14);
  background: #fff;
  color: #566a7f;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bot-template-filter:hover,
.bot-template-filter.active {
  border-color: rgba(105, 108, 255, 0.35);
  background: rgba(105, 108, 255, 0.08);
  color: #696cff;
}

.bot-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.bot-template-card {
  border: 1px solid rgba(67, 89, 113, 0.12);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bot-template-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(67, 89, 113, 0.12);
}

.bot-template-gallery {
  position: relative;
  aspect-ratio: 16 / 10;
  background: rgba(67, 89, 113, 0.05);
}

.bot-template-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.bot-template-carousel-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.bot-template-carousel-image.active {
  opacity: 1;
}

.bot-template-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.5rem;
  display: flex;
  justify-content: center;
  gap: 0.3rem;
}

.bot-template-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.bot-template-dot.active {
  background: #fff;
  transform: scale(1.15);
}

.bot-template-image-count {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.72rem;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}

.bot-template-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  gap: 0.35rem;
}

.bot-template-placeholder i {
  font-size: 2rem;
  opacity: 0.9;
}

.bot-template-placeholder span {
  font-size: 0.78rem;
  opacity: 0.9;
}

.bot-template-category {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
}

.bot-template-body {
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.bot-template-title {
  margin: 0;
  font-size: 0.95rem;
}

.bot-template-desc {
  margin: 0;
  font-size: 0.78rem;
  color: #8592a3;
}

.bot-template-snippet {
  margin: 0;
  font-size: 0.75rem;
  color: #697a8d;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bot-template-actions {
  display: flex;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.bot-template-create {
  background: rgba(105, 108, 255, 0.03);
}

.bot-template-modal-gallery {
  min-height: 220px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(67, 89, 113, 0.05);
  position: relative;
}

.bot-template-modal-image {
  width: 100%;
  display: none;
  object-fit: cover;
  border-radius: 12px;
}

.bot-template-modal-image.active {
  display: block;
}

.bot-template-modal-empty {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #8592a3;
  gap: 0.35rem;
}

.bot-template-modal-message {
  white-space: pre-wrap;
}

.bot-template-edit-media-item {
  display: block;
  border: 1px solid rgba(67, 89, 113, 0.12);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  margin: 0;
  position: relative;
}

.bot-template-edit-media-item input {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  z-index: 2;
}

.bot-template-edit-media-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.bot-template-edit-media-item span {
  display: block;
  font-size: 0.72rem;
  color: #8592a3;
  padding: 0.35rem 0.5rem;
  text-align: center;
}

.bot-template-edit-media-item:has(input:not(:checked)) {
  opacity: 0.55;
  border-style: dashed;
}

@media (max-width: 767.98px) {
  .bot-template-grid {
    grid-template-columns: 1fr;
  }
}
