: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;
}

.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);
}

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

.notification-form {
  max-width: 600px;
}

.notification-form h5 {
  color: var(--dark-color);
  font-weight: 600;
  font-size: 1.25rem;
}

.notification-form .form-text {
  font-size: 0.75rem;
  color: var(--gray-color);
  margin-top: 0.25rem;
  display: block;
}

.no-channels {
  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-channels h5 {
  color: var(--dark-color);
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.no-channels 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;
}

.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);
}

.notification-form .btn-primary {
  align-self: center;
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s ease;
}

.notification-form .btn-primary:hover {
  background-color: #1d4ed8;
}

.notification-form .btn-secondary {
  align-self: center;
  background-color: #e5e7eb;
  color: var(--dark-color);
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s ease;
}

.notification-form .btn-secondary:hover {
  background-color: #e5e7eb;
  color: var(--dark-color);
  transition: background-color 0.2s ease;
}

.add-telegram-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);
}

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

.form-control.is-invalid:focus {
  border-color: var(--danger-color);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.08);
}

.invalid-feedback {
  display: none;
  color: var(--danger-color);
  font-size: 12px;
  margin-top: 4px;
}

.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);
  }
}

@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;
  }

  .notifications-section {
    padding: 0.5rem;
  }

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

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

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

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

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

  .notification-form .btn-primary {
    font-size: 0.75rem;
    padding: 8px 12px;
  }

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

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