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

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

.custom-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: var(--success-color);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  animation:
    slideIn 0.3s ease,
    slideOut 0.3s ease 1.7s;
}

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

.custom-toast.info {
  background-color: var(--primary-color);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.page-header {
  margin-bottom: 1rem;
  padding: 1rem 0;
}

.page-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark-color);
}

.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-body {
  padding: 0.5rem;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-color);
  font-family: "Inter", sans-serif;
  margin-bottom: 4px;
}

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

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

.search-input.is-invalid {
  border-color: var(--danger-color);
}

.input-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.search-input {
  width: 345px;
  padding: 0 12px;
  height: 40px;
  border: 1px solid #b7b8bf;
  border-radius: 6px;
  font-size: 14px;
  color: black;
}

.search-input::placeholder {
  color: #9ca3af;
}

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

.search-input.disabled {
  background-color: #e5e7eb;
  border: 1px solid #b7b8bf;
  cursor: not-allowed;
  color: black;
}

.edit-icon {
  width: 24px;
  height: 24px;
  cursor: pointer;
  opacity: 0.6;
}

.edit-icon:hover {
  opacity: 1;
}

.swal2-actions {
  display: inline-flex;
  gap: 8px;
}

.btn-custom {
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-custom-cancel {
  background: #e2e2ec;
  color: #424242;
}

.btn-custom-cancel:hover {
  background: #d0d0da;
}

.btn-custom-save {
  background-color: #327cc8;
  font-weight: 700;
  font-size: 16px;
  color: white;
}

.btn-custom-save:hover {
  background-color: #2a6ba8;
}

.btn-custom-save:disabled {
  background-color: #93c5fd;
  cursor: not-allowed;
}

.btn-connect-telegram {
  background-color: #327cc8;
  color: white;
  border: none;
  width: 345px;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background-color 0.2s ease;
}

.btn-connect-telegram:hover {
  background-color: #2a6ba8;
}

.btn-connect-telegram:disabled {
  background-color: #93c5fd;
  cursor: not-allowed;
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.spinner-border {
  display: inline-block;
  border: 0.25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .card-body {
    padding: 1rem;
  }
  .search-input {
    width: 100%;
    max-width: 345px;
  }
  .btn-connect-telegram {
    width: 100%;
    max-width: 345px;
    justify-content: center;
  }
  .input-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .swal2-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
