:root {
  /* WhatsApp Colors */
  --primary-color: #25d366;
  --secondary-color: #128c7e;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;

  /* Enhanced Documentation Colors */
  --whatsapp-green: #25d366;
  --whatsapp-dark: #128c7e;
  --whatsapp-light: #dcf8c6;

  /* Typography */
  --font-primary:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Fira Code", "Monaco", "Cascadia Code", "Courier New", monospace;
  --font-heading: "Poppins", var(--font-primary);

  /* Enhanced Shadows */
  --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.15);
}

body {
  background-color: #f5f7fa;
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--dark-color);
}

/* Enhanced Pagination Styles */
#requests-pagination {
  border-top: 1px solid #e9ecef;
  padding-top: 1rem;
}

#requests-pagination .pagination .page-link {
  border-radius: 0.375rem;
  margin: 0 0.125rem;
  color: var(--primary-color);
}

#requests-pagination .pagination .page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

#requests-pagination .pagination .page-link:hover {
  background-color: rgba(37, 211, 102, 0.1);
  border-color: var(--primary-color);
}

#goto-page-input {
  text-align: center;
}

/* Enhanced Search Styles */
#groups-search {
  transition: box-shadow 0.15s ease-in-out;
}

#groups-search:focus {
  box-shadow: 0 0 0 0.2rem rgba(37, 211, 102, 0.25);
  border-color: var(--primary-color);
}

.input-group-text {
  background-color: transparent;
  border-right: none;
}

.input-group .form-control {
  border-left: none;
}

.input-group .form-control:focus {
  border-left: none;
  box-shadow: none;
}

.input-group .form-control:focus + .input-group-text {
  border-color: var(--primary-color);
}

.navbar-brand {
  font-weight: 600;
}

.content-section {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stats-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-light);
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.stats-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  color: white;
  font-size: 1.5rem;
}

.stats-content h3 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark-color);
}

.stats-content p {
  margin: 0;
  color: #6c757d;
  font-size: 0.9rem;
}

.card {
  border: none;
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.card-header {
  background: white;
  border-bottom: 1px solid #e9ecef;
  border-radius: 12px 12px 0 0 !important;
  font-weight: 600;
}

.btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.table {
  border-radius: 8px;
  overflow: hidden;
}

.table th {
  background-color: #f8f9fa;
  border: none;
  font-weight: 600;
  color: var(--dark-color);
}

.table td {
  border: none;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

.badge {
  border-radius: 6px;
  font-weight: 500;
}

.nav-link {
  border-radius: 8px;
  margin: 0 0.25rem;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
}

#connection-status.connected {
  color: var(--success-color);
}

#connection-status.disconnected {
  color: var(--danger-color);
}

#connection-status.connecting {
  color: var(--warning-color);
  animation: pulse 1s infinite;
}

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

.qr-code {
  max-width: 200px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact-import-area {
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  transition: all 0.2s ease;
}

.contact-import-area:hover {
  border-color: var(--primary-color);
  background-color: rgba(37, 211, 102, 0.05);
}

.contact-import-area.dragover {
  border-color: var(--primary-color);
  background-color: rgba(37, 211, 102, 0.1);
}

.message-template-editor {
  font-family: "Courier New", monospace;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.message-preview {
  background-color: #e3f2fd;
  border-left: 4px solid var(--primary-color);
  padding: 1rem;
  border-radius: 0 8px 8px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  white-space: pre-wrap;
}

.flow-step {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background: white;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.flow-step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  color: white;
  font-size: 0.875rem;
}

.flow-step.completed .flow-step-icon {
  background-color: var(--success-color);
}

.flow-step.current .flow-step-icon {
  background-color: var(--primary-color);
}

.flow-step.pending .flow-step-icon {
  background-color: #6c757d;
}

.loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.contact-row {
  transition: all 0.2s ease;
}

.contact-row:hover {
  background-color: rgba(37, 211, 102, 0.05);
}

.action-buttons .btn {
  margin: 0 0.25rem;
}

.status-badge.pending {
  background-color: #6c757d;
}

.status-badge.sent {
  background-color: var(--info-color);
}

.status-badge.responded {
  background-color: var(--success-color);
}

.status-badge.failed {
  background-color: var(--danger-color);
}

.campaign-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.campaign-stat {
  flex: 1;
  text-align: center;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.campaign-stat h4 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.campaign-stat p {
  margin: 0;
  color: #6c757d;
  font-size: 0.875rem;
}

.progress {
  height: 8px;
  border-radius: 4px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(37, 211, 102, 0.25);
}

.modal-content {
  border-radius: 12px;
}

.modal-header {
  border-bottom: 1px solid #e9ecef;
  border-radius: 12px 12px 0 0;
}

.modal-footer {
  border-top: 1px solid #e9ecef;
  border-radius: 0 0 12px 12px;
}

@media (max-width: 768px) {
  .stats-card {
    flex-direction: column;
    text-align: center;
  }

  .stats-icon {
    margin-right: 0;
    margin-bottom: 1rem;
  }

  .campaign-stats {
    flex-direction: column;
  }

  .action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .action-buttons .btn {
    margin: 0;
    font-size: 0.875rem;
  }
}

.alert {
  border-radius: 8px;
  border: none;
}

.toast {
  border-radius: 8px;
}

.dropdown-menu {
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border: none;
}

.dropdown-item:hover {
  background-color: rgba(37, 211, 102, 0.1);
}

.request-card {
  border-left: 4px solid var(--primary-color);
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

.request-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.request-meta {
  font-size: 0.875rem;
  color: #6c757d;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag-item {
  background-color: rgba(37, 211, 102, 0.1);
  color: var(--secondary-color);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Enhanced Contacts Section Styles */
.variable-btn {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 15px;
  transition: all 0.2s ease;
  border-width: 1px;
}

.variable-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.variable-btn:active {
  transform: translateY(0);
  animation: btnClick 0.1s ease;
}

@keyframes btnClick {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

#message-content {
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 300px;
  background-color: #f8f9fa;
  border: 2px solid #dee2e6;
  transition: border-color 0.2s ease;
}

#message-content:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(37, 211, 102, 0.25);
}

.message-preview {
  background: linear-gradient(135deg, #e5ddd5 0%, #d9d0c7 100%);
  border-radius: 12px;
  padding: 1.2rem;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  min-height: 250px;
  border: 1px solid #d1c7ac;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
}

.message-preview::before {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%2325d366"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893A11.821 11.821 0 0020.885 3.447"/></svg>')
    no-repeat center;
  background-size: contain;
  opacity: 0.3;
}

.message-preview-container {
  position: sticky;
  top: 20px;
}

.contacts-table {
  font-size: 0.85rem;
}

.contacts-table th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  font-weight: 600;
  border-top: none;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.contacts-table td {
  vertical-align: middle;
  padding: 0.75rem 0.5rem;
}

.upload-drop-zone {
  border: 2px dashed #dee2e6;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.upload-drop-zone:hover {
  border-color: var(--primary-color);
  background: linear-gradient(
    135deg,
    rgba(37, 211, 102, 0.05) 0%,
    rgba(37, 211, 102, 0.02) 100%
  );
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.upload-drop-zone.dragover {
  border-color: var(--primary-color);
  background: linear-gradient(
    135deg,
    rgba(37, 211, 102, 0.1) 0%,
    rgba(37, 211, 102, 0.05) 100%
  );
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.2);
}

.file-info {
  background: linear-gradient(135deg, var(--light-color) 0%, #ffffff 100%);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
  border: 1px solid #e9ecef;
}

.contacts-summary {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  color: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}

.preview-phone {
  background: linear-gradient(135deg, #25d366 0%, #20b358 100%);
  color: white;
  border-radius: 18px 18px 18px 4px;
  padding: 0.8rem 1.2rem;
  margin: 0.5rem 0;
  max-width: 85%;
  word-wrap: break-word;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
  position: relative;
}

.preview-phone::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -8px;
  width: 0;
  height: 0;
  border: 8px solid transparent;
  border-right-color: #25d366;
  border-bottom-color: #25d366;
  border-left: none;
  border-bottom: none;
}

.table-responsive {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-file {
  position: relative;
  overflow: hidden;
}

.btn-file input[type="file"] {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 100%;
  min-height: 100%;
  font-size: 100px;
  text-align: right;
  filter: alpha(opacity=0);
  opacity: 0;
  outline: none;
  background: white;
  cursor: inherit;
  display: block;
}

.contact-status {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-actions {
  display: flex;
  gap: 0.25rem;
}

.contact-actions .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

#contacts-count {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

.campaign-launch-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e9ecef;
  margin-top: 1rem;
}

.variable-hint {
  font-size: 0.75rem;
  color: #6c757d;
  font-style: italic;
  margin-top: 0.5rem;
}

/* Group Requests Specific Styles */
.request-card {
  border-left: 4px solid #dee2e6;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  margin-bottom: 1rem;
}

.request-card:hover {
  border-left-color: var(--primary-color);
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.request-card .message-content {
  max-height: 150px;
  overflow-y: auto;
}

.request-card .message-content .bg-light {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 0.9em;
  line-height: 1.4;
  max-height: 100px;
  overflow-y: auto;
}

.request-card .extracted-info small {
  display: block;
  margin-bottom: 0.25rem;
}

.request-card .reasoning {
  font-style: italic;
  border-left: 3px solid #17a2b8;
  padding-left: 0.75rem;
  margin-left: 0.5rem;
  background-color: rgba(23, 162, 184, 0.05);
  border-radius: 0 4px 4px 0;
}

.badge {
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
}

.btn-group-vertical .btn {
  font-size: 0.85em;
  padding: 0.375rem 0.5rem;
  margin-bottom: 0.25rem;
  white-space: nowrap;
}

.btn-group-vertical .btn:last-child {
  margin-bottom: 0;
}

/* Classification badges */
.badge.bg-warning {
  color: #212529;
}

.badge.bg-info {
  color: #fff;
}

.badge.bg-success {
  color: #fff;
}

.badge.bg-secondary {
  color: #fff;
}

/* Confidence badges */
.badge.bg-danger {
  background-color: #dc3545 !important;
}

/* Filter section */
.filter-section .form-select {
  border-radius: 8px;
  border: 1px solid #dee2e6;
  transition: border-color 0.2s ease;
}

.filter-section .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(37, 211, 102, 0.25);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}

.empty-state .fa-3x {
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Pagination */
.pagination .page-link {
  border-radius: 6px;
  margin: 0 0.125rem;
  border: 1px solid #dee2e6;
  color: var(--dark-color);
}

.pagination .page-link:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.pagination .page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

@media (max-width: 768px) {
  .variable-btn {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    margin: 0.1rem;
  }

  #message-content {
    min-height: 200px;
    font-size: 0.8rem;
  }

  .message-preview {
    min-height: 150px;
    font-size: 0.8rem;
    padding: 1rem;
  }

  .contacts-table {
    font-size: 0.75rem;
  }

  .contact-actions {
    flex-direction: column;
  }

  /* Mobile responsiveness for group requests */
  .btn-group-vertical {
    display: grid;
    gap: 0.25rem;
  }

  .btn-group-vertical .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  .request-card .col-md-4 {
    margin-top: 1rem;
  }

  .filter-section {
    margin-bottom: 1rem;
  }

  .filter-section .col-md-3 {
    margin-bottom: 0.5rem;
  }
}

/* ====== BULK SELECTION STYLES ====== */

.request-card {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
  border: 2px solid transparent;
}

.request-card:has(.request-checkbox:checked) {
  border-color: var(--primary-color);
  background: linear-gradient(
    135deg,
    rgba(37, 211, 102, 0.02) 0%,
    rgba(37, 211, 102, 0.01) 100%
  );
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.15);
}

.request-checkbox {
  transform: scale(1.2);
  cursor: pointer;
}

.request-checkbox:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

#bulk-actions-card {
  border: 2px solid var(--primary-color);
  background: linear-gradient(
    135deg,
    rgba(37, 211, 102, 0.05) 0%,
    rgba(37, 211, 102, 0.02) 100%
  );
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#selected-count {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
}

#master-checkbox {
  transform: scale(1.3);
  cursor: pointer;
}

#master-checkbox:indeterminate {
  background-color: var(--warning-color);
  border-color: var(--warning-color);
}

#master-checkbox:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.bulk-action-buttons .btn {
  transition: all 0.2s ease;
}

.bulk-action-buttons .btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.bulk-action-buttons .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Highlight selected requests in list */
.request-card.selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.2);
}

/* Responsive adjustments for bulk actions */
@media (max-width: 768px) {
  #bulk-actions-card .row {
    flex-direction: column;
    gap: 1rem;
  }

  #bulk-actions-card .col-md-6 {
    text-align: center !important;
  }

  .bulk-action-buttons {
    justify-content: center;
  }
}

/* ====== DOCUMENTATION STYLES ====== */

#docs-section {
  height: calc(100vh - 120px);
  overflow: hidden;
}

/* Documentation Sidebar */
.docs-sidebar {
  background: #f8f9fa;
  border-right: 1px solid #e9ecef;
  height: 100%;
  overflow-y: auto;
  padding: 1.5rem 1rem;
}

.docs-nav {
  position: sticky;
  top: 0;
}

.docs-search .input-group-text {
  background: #fff;
  border-right: none;
}

.docs-search .form-control {
  border-left: none;
  box-shadow: none;
}

.docs-search .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(37, 211, 102, 0.25);
}

/* Navigation Tree */
.docs-nav-section {
  margin-bottom: 1.5rem;
}

.docs-nav-title {
  color: #24292f;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid #e9ecef;
}

.docs-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.docs-nav-list li {
  margin-bottom: 0.25rem;
}

.docs-nav-link {
  display: block;
  padding: 0.375rem 0.75rem;
  color: #656d76;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.docs-nav-link:hover {
  background-color: #f3f4f6;
  color: #24292f;
  text-decoration: none;
}

.docs-nav-link.active {
  background-color: var(--primary-color);
  color: white;
  font-weight: 500;
}

.docs-nav-link.active:hover {
  background-color: var(--secondary-color);
}

/* Documentation Content */
.docs-content {
  height: 100%;
  overflow-y: auto;
  padding: 0;
}

.docs-main {
  padding: 1.5rem 2rem;
  max-width: 1000px;
}

/* Breadcrumb */
.docs-breadcrumb {
  margin-bottom: 1.5rem;
}

.docs-breadcrumb .breadcrumb {
  background: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.docs-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  content: ">";
  color: #6c757d;
}

.docs-breadcrumb .breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
}

.docs-breadcrumb .breadcrumb-item a:hover {
  text-decoration: underline;
}

/* Content Area */
.docs-content-area {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  min-height: 600px;
}

/* Markdown Content Styling */
.docs-content-area h1 {
  font-size: 2rem;
  font-weight: 600;
  color: #24292f;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e9ecef;
}

.docs-content-area h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #24292f;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #e9ecef;
}

.docs-content-area h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #24292f;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.docs-content-area h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #24292f;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.docs-content-area p {
  color: #656d76;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.docs-content-area ul,
.docs-content-area ol {
  color: #656d76;
  line-height: 1.7;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.docs-content-area li {
  margin-bottom: 0.25rem;
}

.docs-content-area code {
  background: #f6f8fa;
  color: #d73a49;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.875em;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.docs-content-area pre {
  background: #f6f8fa;
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  border: 1px solid #e9ecef;
}

.docs-content-area pre code {
  background: none;
  color: #24292f;
  padding: 0;
  border-radius: 0;
  font-size: 0.875rem;
}

.docs-content-area blockquote {
  border-left: 4px solid #e9ecef;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #656d76;
  font-style: italic;
}

.docs-content-area table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.docs-content-area table th,
.docs-content-area table td {
  padding: 0.75rem;
  border: 1px solid #e9ecef;
  text-align: left;
}

.docs-content-area table th {
  background: #f6f8fa;
  font-weight: 600;
  color: #24292f;
}

.docs-content-area table td {
  color: #656d76;
}

.docs-content-area .alert {
  border-radius: 6px;
  padding: 1rem;
  margin: 1rem 0;
  border: 1px solid;
}

.docs-content-area .alert-info {
  background: #f0f9ff;
  border-color: #0ea5e9;
  color: #0369a1;
}

.docs-content-area .alert-warning {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #d97706;
}

.docs-content-area .alert-success {
  background: #f0fdf4;
  border-color: #22c55e;
  color: #16a34a;
}

/* Navigation Footer */
.docs-nav-footer {
  margin-top: 3rem;
}

.docs-nav-footer-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.docs-nav-footer-link:hover {
  text-decoration: underline;
}

/* Edit Link */
.docs-edit-link {
  text-align: center;
}

.docs-edit-link a {
  color: var(--primary-color);
  text-decoration: none;
}

.docs-edit-link a:hover {
  text-decoration: underline;
}

/* Search Highlighting */
.docs-search-highlight {
  background-color: #fff3cd;
  padding: 0.1em 0.2em;
  border-radius: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
  #docs-section .row {
    flex-direction: column;
  }

  .docs-sidebar {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem;
  }

  .docs-main {
    padding: 1rem;
  }

  .docs-content-area {
    padding: 1rem;
  }

  .docs-nav-tree {
    max-height: 300px;
    overflow-y: auto;
  }
}

@media (max-width: 576px) {
  .docs-content-area h1 {
    font-size: 1.5rem;
  }

  .docs-content-area h2 {
    font-size: 1.25rem;
  }

  .docs-main {
    padding: 0.5rem;
  }

  .docs-content-area {
    padding: 1rem 0.75rem;
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  .docs-sidebar {
    background: #21262d;
    border-color: #30363d;
  }

  .docs-nav-title {
    color: #f0f6fc;
    border-color: #30363d;
  }

  .docs-nav-link {
    color: #8b949e;
  }

  .docs-nav-link:hover {
    background-color: #30363d;
    color: #f0f6fc;
  }

  .docs-content-area {
    background: #0d1117;
    color: #e6edf3;
  }

  .docs-content-area h1,
  .docs-content-area h2,
  .docs-content-area h3,
  .docs-content-area h4 {
    color: #f0f6fc;
    border-color: #30363d;
  }

  .docs-content-area p,
  .docs-content-area li {
    color: #e6edf3;
  }
}

/* ====== CAMPAIGN DETAIL PANEL STYLES ====== */

/* Campaign Detail Panel Styles */
.contacts-table {
  font-size: 0.875rem;
}

.contacts-table th {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  color: var(--dark-color);
}

.contacts-table td {
  vertical-align: middle;
}

.contact-actions {
  white-space: nowrap;
}

.contact-actions .btn {
  margin-right: 0.25rem;
}

.contact-actions .btn:last-child {
  margin-right: 0;
}

.variable-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.variable-btn:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

.variable-btn.btn-success {
  background-color: var(--success-color);
  border-color: var(--success-color);
  color: white;
}

.message-template-editor {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.5;
  resize: vertical;
}

.message-preview {
  font-family: var(--font-primary);
  font-size: 0.875rem;
  line-height: 1.5;
  min-height: 3rem;
  border: 1px solid #e9ecef;
  word-wrap: break-word;
}

.whitespace-pre-wrap {
  white-space: pre-wrap;
}

.status-badge {
  font-size: 0.75rem;
  padding: 0.35em 0.65em;
}

.status-badge.pending,
.status-badge.imported {
  background-color: var(--warning-color);
  color: var(--dark-color);
}

.status-badge.sent {
  background-color: var(--info-color);
  color: white;
}

.status-badge.responded,
.status-badge.completed {
  background-color: var(--success-color);
  color: white;
}

.status-badge.failed,
.status-badge.error {
  background-color: var(--danger-color);
  color: white;
}

/* Enhanced Campaign Stats */
.campaign-stats .text-center {
  transition: transform 0.2s ease;
}

.campaign-stats .text-center:hover {
  transform: translateY(-2px);
}

/* Launch Campaign Section */
.card:has([id*="delay-between-messages"]) {
  border-left: 4px solid var(--success-color);
}

/* Responsive improvements */
@media (max-width: 768px) {
  .contact-actions {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .contact-actions .btn {
    margin-right: 0;
    width: 100%;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  .variable-btn {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    margin-bottom: 0.25rem;
  }
}

/* Enhanced animations */
@keyframes buttonSuccess {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.btn.btn-success {
  animation: buttonSuccess 0.3s ease;
}
