:root {
  --primary-color: #2563eb;
  --success-color: #10b981;
  --danger-color: #e11d48;
  --light-color: #f9fafb;
  --dark-color: #374151;
  --border-color: #e6e9ee;
  --gray-color: #6b7280;
  --validation-tick-color: #327cc8;
}

* {
  font-family: "Inter", sans-serif;
}

.webhook-field-error {
  color: var(--danger-color);
  font-size: 12px;
  margin-top: 4px;
  min-height: 16px;
}

.form-control.is-invalid {
  border-color: var(--danger-color);
}

.form-control.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.settings-nav {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.settings-nav .nav-link {
  color: var(--gray-color);
  border: none;
  background: none;
  padding: 8px 12px;
  margin-right: 16px;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.settings-nav .nav-link.active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}

.settings-nav .nav-link:hover {
  color: var(--primary-color);
}

.webhooks-section {
  padding: 1rem;
  background: var(--light-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
  overflow: visible;
}

.webhooks-section .table-responsive {
  overflow: visible;
}

.no-webhooks {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.no-webhooks h5 {
  color: var(--dark-color);
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.no-webhooks p {
  color: var(--gray-color);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.table th {
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0.75rem;
  color: var(--primary-color);
  background-color: var(--light-color);
  font-size: 0.875rem;
}

.table td {
  padding: 1rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  font-size: 0.875rem;
}

.table tbody tr:hover {
  background-color: rgba(0, 102, 255, 0.02);
}

.event-types .badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--light-color);
  color: var(--dark-color);
  margin-right: 0.5rem;
}

.event-type-row {
  font-size: 0.875rem;
  color: var(--dark-color);
  padding: 2px 0;
}

.webhook-url {
  display: block;
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}

.webhook-url:hover {
  overflow: visible;
  white-space: normal;
  word-break: break-all;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: black;
}

.status-badge.active {
  background-color: #00d18933;
}

.status-badge.inactive {
  background-color: #dd3b3a33;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  min-width: 150px;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: var(--light-color);
}

.dropdown-item.text-danger {
  color: var(--danger-color);
}

.webhook-form .btn-primary,
.add-webhook-container .btn-primary,
.no-webhooks .btn-primary {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
    linear-gradient(180deg, #4685ff 0%, #246cf9 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s ease;
}

.webhook-form .btn-primary:hover,
.add-webhook-container .btn-primary:hover,
.no-webhooks .btn-primary:hover {
  opacity: 0.85;
}

.add-webhook-container {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-color);
  margin-bottom: 4px;
}

.form-label.required::after {
  content: "*";
  color: var(--danger-color);
  margin-left: 4px;
}

.form-control,
.form-select {
  width: 100%;
  padding: 0 12px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  color: var(--dark-color);
  box-sizing: border-box;
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.08);
}

.form-check {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.form-check-input {
  margin-right: 8px;
}

.form-check-label {
  font-size: 14px;
  color: var(--gray-color);
}

/* Custom Toast Styles */
.custom-toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  max-width: 350px;
  font-family: "Inter", sans-serif;
  border-radius: 0.25rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  background-color: var(--light-color);
  overflow: hidden;
}

.custom-toast-header {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5rem;
  color: white;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.custom-toast-header.success {
  background-color: var(--success-color);
}

.custom-toast-header.error {
  background-color: var(--danger-color);
}

.custom-toast-header .toast-icon {
  margin-right: 0.5rem;
}

.custom-toast-header .toast-title {
  flex-grow: 1;
  font-weight: 700;
}

.custom-toast-header .toast-close {
  background: none;
  border: none;
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  opacity: 0.8;
}

.custom-toast-header .toast-close:hover {
  opacity: 1;
}

.custom-toast-body {
  padding: 0.75rem;
  font-size: 0.875rem;
  color: var(--dark-color);
}

.custom-toast.fade-in {
  animation: fadeIn 0.3s ease-in;
}

.custom-toast.fade-out {
  animation: fadeOut 0.3s ease-out;
}

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

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

.modal {
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.table tr {
  transition: all 0.2s ease;
}

@media (max-width: 768px) {
  .settings-nav {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

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

  .settings-nav .nav-link {
    margin-right: 16px;
    font-size: 0.75rem;
    padding: 8px;
  }

  .webhooks-section {
    padding: 0.5rem;
  }

  .table th,
  .table td {
    font-size: 0.75rem;
    padding: 0.5rem;
  }

  .table-responsive {
    overflow-x: auto;
  }

  .no-webhooks {
    padding: 2rem 1rem;
    min-height: auto;
  }

  .no-webhooks h5 {
    font-size: 1rem;
  }

  .no-webhooks p {
    font-size: 0.75rem;
  }

  .webhook-form .btn-primary,
  .add-webhook-container .btn-primary {
    font-size: 0.75rem;
    padding: 8px 12px;
  }

  .add-webhook-container {
    justify-content: center;
  }

  .custom-toast {
    max-width: 90%;
  }
}

/* SweetAlert2 popup styles (matching user-management) */
.swal-status-popup {
  font-family: Inter, sans-serif;
  width: 672px !important;
  height: 454px !important;
  border-radius: 16px;
  padding: 32px 40px !important;
  text-align: center;
}

.swal-status-popup .swal2-html-container {
  margin: 0;
  padding: 0;
  gap: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.swal-status-popup .swal2-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 24px;
  height: 24px;
  background-color: #e8e8ed;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: #9ca3af;
  transition: background-color 0.2s;
}

.swal-status-popup .swal2-close:hover {
  background-color: #d1d5db;
}

.status-popup-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.status-popup-title {
  font-family: Inter, sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 40px;
  color: #424242;
  margin: 0;
  text-align: center;
}

.status-popup-icon {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-popup-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.status-popup-text {
  font-family: Inter, sans-serif;
  font-size: 14px;
  color: black;
  line-height: 1.5;
  margin: 0;
  text-align: left;
  width: 100%;
}

.swal-status-actions {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 16px !important;
  margin-top: 15px !important;
  width: 100% !important;
  flex-wrap: nowrap !important;
}

.btn-status-cancel {
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  min-width: 120px;
  height: 40px;
  padding: 0 24px;
  border-radius: 20px;
  background-color: #e2e2ec;
  color: #000000;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-status-cancel:hover {
  background-color: #d1d1db;
}

.btn-status-confirm {
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  min-width: 120px;
  height: 40px;
  padding: 0 24px;
  border-radius: 20px;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-status-activate {
  background-color: #327cc8;
}

.btn-status-activate:hover {
  background-color: #2a6ab0;
}

.btn-status-deactivate {
  background-color: #df2d2d;
}

.btn-status-deactivate:hover {
  background-color: #c52828;
}

.btn-status-delete {
  background-color: #df2d2d;
}

.btn-status-delete:hover {
  background-color: #c52828;
}

/* Pagination Styles */
.pagination-info {
  font-size: 14px;
}

.pagination {
  margin: 0;
}

.pagination .page-link {
  color: #6c757d;
  border: 1px solid #dee2e6;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  margin: 0 0.125rem;
  transition: all 0.2s ease;
}

.pagination .page-link:hover {
  color: #246cf9;
  background-color: #e9ecef;
  border-color: #246cf9;
}

.pagination .page-item.active .page-link {
  background-color: #246cf9;
  border-color: #246cf9;
  color: white;
}

.pagination .page-item.disabled .page-link {
  color: #6c757d;
  background-color: #fff;
  border-color: #dee2e6;
  cursor: not-allowed;
}

.pagination .page-item:first-child .page-link {
  border-top-left-radius: 0.375rem;
  border-bottom-left-radius: 0.375rem;
}

.pagination .page-item:last-child .page-link {
  border-top-right-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
}
