/* Reset стили */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f9fafb; /* светло-серый фон как у botfaqtor */
  color: #111827; /* темный текст */
  line-height: 1.5;
}

input, button, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

/* Обертка для контента по центру */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
/* Центрированная карточка */
.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  padding: 24px;
  margin-top: 20px;
}

/* Заголовок */
h1,
h2,
h3 {
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
  color: #111827;
}

/* Логотип или заголовок формы */
.title {
  font-size: 1.25rem;
  color: #111827;
}

/* Форма */
form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

form input,
form select,
form button {
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background-color: #fff;
  transition: all 0.2s ease-in-out;
  font-size: 1rem;
}

form input:focus,
form select:focus,
form button:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Кнопки */
button {
  background-color: #2563eb;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #1d4ed8;
}

/* Ссылки */
a {
  color: #2563eb;
  text-decoration: none;
  font-size: 0.875rem;
  display: inline-block;
  text-align: center;
  margin-top: 12px;
}

a:hover {
  text-decoration: underline;
}

/* Текстовые поля */
label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

input[type="text"],
input[type="url"],
input[type="number"],
input[type="email"],
select {
  font-size: 1rem;
  color: #111827;
}

input::placeholder {
  color: #9ca3af;
}

/* Подсказки и ошибки */
.error-message {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 4px;
  display: block;
}

.success-message {
  color: #10b981;
  font-size: 0.875rem;
  text-align: center;
  margin-top: 16px;
}

/* Контейнер формы */
.form-container,
.links-container {
  padding: 0 50px 40px 50px;
  box-sizing: border-box;
}

/* Стили для кнопки "Выход" */
.logout-btn {
  font-size: 0.875rem;
  color: #dc2626;
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  float: right;
}

.logout-btn:hover {
  opacity: 0.8;
}

header{
  padding: 25px 0 10px 0;
  margin-bottom: 30px;
}
/* Заголовок в хедере */
.header-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
}

/* Карточки ссылок */
.link-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

.link-url {
  word-break: break-all;
  color: #2563eb;
  font-size: 0.875rem;
  margin-bottom: 8px;
}

.copy-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 0.75rem;
  cursor: pointer;
  margin-left: 8px;
}

.copy-btn:hover {
  color: #111827;
}

.analytics-toggle {
  color: #2563eb;
  background: none;
  border: none;
  margin-top: 8px;
  font-size: 0.8125rem;
  cursor: pointer;
}

.analytics-list {
  margin-top: 12px;
  padding-left: 16px;
  font-size: 0.8125rem;
  color: #6b7280;
}

.analytics-item {
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #e5e7eb;
}

.test-link {
  display: block;
  color: #2563eb;
  font-size: 0.875rem;
  text-decoration: underline;
  margin-top: 12px;
  cursor: pointer;
}

.test-link:hover {
  color: #1d4ed8;
}

.empty-state {
  text-align: center;
  color: #9ca3af;
  padding: 40px 0;
  font-size: 0.9375rem;
}

/* Футер */
footer {
  margin-top: 60px;
  text-align: center;
  font-size: 0.8125rem;
  color: #9ca3af;
  padding: 20px;
}

/* Утилитные классы (можно использовать в index.js) */
.mt-2 {
  margin-top: 8px;
}

.mb-4 {
  margin-bottom: 16px;
}

.mt-6 {
  margin-top: 24px;
}

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.justify-between {
  justify-content: space-between;
}

.items-center {
  align-items: center;
}

.gap-2 {
  gap: 8px;
}

.w-full {
  width: 100%;
}

.rounded {
  border-radius: 8px;
}

.rounded-md {
  border-radius: 12px;
}

.bg-white {
  background-color: #ffffff;
}

.shadow-sm {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hover\:shadow {
  transition: box-shadow 0.2s ease;
}

.hover\:shadow:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

.border {
  border: 1px solid #e5e7eb;
}

.border-b {
  border-bottom: 1px solid #e5e7eb;
}

.text-blue-500 {
  color: #3b82f6;
}

.text-blue-600:hover {
  color: #2563eb;
}

.text-gray-500 {
  color: #3b4250;
}

.text-red-500 {
  color: #ef4444;
}

.font-semibold {
  font-weight: 600;
}

.cursor-pointer {
  cursor: pointer;
}

.transition {
  transition: all 0.2s ease;
}

.underline {
  text-decoration: underline;
}

/* ===== Layout ===== */

.form-row {
  display: flex;
  flex-wrap: wrap; /* чтобы элементы переносились на мобильных */
  gap: 16px;
  margin-bottom: var(--space-md);
}

.form-row-50 {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 50px;
  flex-wrap: wrap;
}

.link-card {
  padding: 25px;
}

.test-link-custom {
  font-weight: 500;
  font-size: 14px;
  color: #818c91;
  text-align: right;
  display: block;
  margin-top: 12px;
}

.form-row-inline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row-50px {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .form-row-50px {
    flex-direction: row;
    gap: 50px;
  }
  .form-row-50px > .half {
    flex: 1;
  }
}

.link-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

/* Протестировать ссылку – аккуратный стиль */
.test-link-clean {
  font-weight: 500;
  font-size: 14px;
  color: #818c91;
  text-align: right;
  display: block;
  margin-top: 20px;
  background: none;
  border: none;
  cursor: pointer;
}

@media (min-width: 768px) {
  .form-row {
    flex-direction: row;
    justify-content: space-between;
    padding-left: 50px;
    padding-right: 50px;
  }
}

@media (max-width: 768px) {
  .form-container,
  .links-container {
    padding-left: 20px;
    padding-right: 20px;
  }
  .form-row-inline {
    flex-direction: row;
    gap: 50px;
  }

  .form-row-inline > .form-group {
    flex: 1;
  }
}

.form-group {
  flex: 1 1 calc(50% - 32px); /* равномерное распределение */
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Кнопки */
.btn-primary,
button[type="submit"],
button.px-4 {
  background-color: #6695e2 !important;
  border: none;
  color: white;
  font-weight: 600;
  transition: background-color 0.2s ease-in-out;
}

.btn-primary:hover,
button[type="submit"]:hover,
button.px-4:hover {
  background-color: #7aaae9 !important;
}

.copy-icon {
  margin-left: 4px;
  font-size: 14px;
  cursor: pointer;
  color: #9ca3af;
  transition: color 0.2s;
}
.copy-icon:hover {
  color: #111827;
}

.test-link-clean {
  font-weight: 500;
  font-size: 14px;
  color: #818c91;
  background: none;
  border: none;
  margin-top: 20px;
  text-align: right;
  display: inline-block;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.test-link-clean:hover {
  color: #4b5563;
  background: none;
}

/* Отступ сверху у блока аналитики */
.link-card summary {
  margin-top: 20px;
}

.custom-select {
  display: block;
  width: 100%;
  padding: 12px 40px 12px 16px; /* справа больше, чтобы оставить место под стрелку */
  font-size: 1rem;
  line-height: 1.5;
  color: #111827;
  background-color: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  cursor: pointer;
}

.custom-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background-color: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.875rem;
  color: #111827;
  cursor: pointer;
}

.dropdown-item:hover {
  background-color: #f3f4f6;
}

.dropdown-item input[type="checkbox"] {
  cursor: pointer;
}

.paddinglr {
padding-left: 10px;
padding-right: 10px;
}
/* Адаптивность */
@media (max-width: 640px) {
  .container {
    padding: 16px;
  }
}