@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
}

:root {
  color-scheme: light;
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: #f5f6f8;
  color: #1f2933;
}

body {
  margin: 0;
  min-height: 100vh;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
}

.container--wide {
  max-width: 1400px;
}

header {
  margin-bottom: 1.75rem;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  margin-bottom: 1.75rem;
}

.page-header__content {
  flex: 1 1 300px;
  min-width: 240px;
}

.page-header__controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  flex-wrap: wrap;
}

.page-header__controls .hint-inline {
  margin-left: 0;
}

.page-header__controls .hint {
  font-size: 0.78rem;
  color: #94a3b8;
}

label.proxy-mode-control {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: #475569;
}

label.proxy-mode-control select {
  min-width: 180px;
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-weight: 500;
}

h1 {
  margin: 0 0 0.35rem;
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.5;
}

.panel {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.panel h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

/* Заголовок с фильтром рядом */
.panel-header-with-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(148, 163, 184, 0.1);
  position: relative;
}

.panel-header-with-filter::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
}

.panel-header-with-filter h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #0f172a, #475569);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-weight: 600;
}

input,
select,
button {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #d9dde3;
  box-sizing: border-box;
}

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

/* Фильтр аккаунтов */
#account-filter-select {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid rgba(148, 163, 184, 0.15);
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
  min-width: 200px;
  cursor: pointer;
  padding: 0.7rem 1rem;
}

#account-filter-select:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 
    0 4px 12px rgba(59, 130, 246, 0.15),
    0 2px 4px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

#account-filter-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 
    0 0 0 3px rgba(59, 130, 246, 0.15),
    0 4px 12px rgba(59, 130, 246, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.06);
  transform: translateY(0);
}

#account-filter-select option {
  background: #ffffff;
  color: #0f172a;
  font-weight: 500;
  padding: 0.5rem;
}

button {
  background-color: #2563eb;
  color: white;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s ease;
}

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

.hint {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
}

.hint-inline {
  color: #64748b;
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

.proxy-test-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.log-box {
  background: #0f172a;
  color: #e2e8f0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  min-height: 90px;
  max-height: 220px;
  overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
  border: 1px solid rgba(148, 163, 184, 0.2);
  margin-top: 0.75rem;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.list-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  background-color: #f8fafc;
  overflow: hidden;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background-color: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  margin-right: 0.25rem;
}

.badge-live {
  background-color: rgba(16, 185, 129, 0.15);
  color: #047857;
  margin-left: 0.5rem;
}

.badge-category {
  background-color: rgba(99, 102, 241, 0.12);
  color: #4338ca;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.category-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem;
  background-color: #fff;
  margin-bottom: 0.75rem;
}

.category-item summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.category-item summary::-webkit-details-marker {
  display: none;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.category-form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.category-suggestions {
  margin-top: 0.5rem;
}

.actions button {
  flex: 0 0 auto;
}

button.secondary {
  background-color: #0f172a;
}

.listing-card {
  position: relative;
}

.listing-card__top {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.listing-card__photo {
  width: 200px;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  padding: 0.5rem;
}

.listing-card__photo img,
.listing-card__photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.listing-card__photo-placeholder {
  line-height: 1.2;
}

.listing-card__overview {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.listing-card__title-row {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.listing-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}

.listing-card__subtitle {
  color: #6b7280;
  margin-top: 0.25rem;
  font-size: 0.95rem;
}

.listing-card__link a {
  color: #2563eb;
  text-decoration: none;
  font-size: 0.85rem;
  word-break: break-word;
}

.listing-card__link a:hover {
  text-decoration: underline;
}

.listing-card__meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.listing-card__meta-badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 600;
}

.listing-card__meta-badge--empty {
  background: rgba(148, 163, 184, 0.2);
  color: #475569;
}

.listing-card__meta-badge--active {
  background: rgba(16, 185, 129, 0.18);
  color: #047857;
}

.listing-card__top-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.listing-card__toggle,
.listing-card__configure,
.listing-card__delete {
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.listing-card__toggle {
  background: #0ea5e9;
  color: white;
}

.listing-card__toggle.is-active {
  background: #22c55e;
}

.listing-card__toggle:hover,
.listing-card__configure:hover,
.listing-card__delete:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.listing-card__configure {
  background: #e0e7ff;
  color: #1e3a8a;
}

.listing-card__delete {
  background: #fee2e2;
  color: #b91c1c;
}

.listing-card__status-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.listing-card__status {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.12);
  color: #1e40af;
}

.listing-card__status--active {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.listing-card__status--inactive {
  background: rgba(100, 116, 139, 0.18);
  color: #334155;
}

.listing-card__status-note {
  font-size: 0.8rem;
  color: #475569;
  margin-top: 0.5rem;
}

.listing-card__interval {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 200px;
}

.listing-card__interval label {
  font-size: 0.9rem;
  color: #475569;
  font-weight: 600;
}

.listing-card__interval input[type='range'] {
  accent-color: #2563eb;
}

.listing-card__summary-grid {
  display: grid;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.listing-card__summary-grid span {
  color: #64748b;
  margin-right: 0.4rem;
}

.listing-card__details {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
}

.listing-card__details summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  padding: 0.9rem 1.2rem;
  font-weight: 600;
  color: #111827;
  background: rgba(37, 99, 235, 0.08);
  list-style: none;
}

.listing-card__details summary::-webkit-details-marker {
  display: none;
}

.listing-card__details[open] summary {
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.listing-card__summary-hint {
  font-size: 0.85rem;
  font-weight: 400;
  color: #64748b;
}

.listing-card__details-content {
  display: grid;
  gap: 1.25rem;
  padding: 1.25rem;
}

/* Новый grid для информационных карточек */
.listing-card__info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
  margin: 1rem 1.25rem 0;
}

/* Информационные карточки - современный дизайн */
.listing-card__info-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.listing-card__info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.listing-card__info-card:hover {
  transform: translateY(-1px);
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
}

.listing-card__info-card:hover::before {
  opacity: 1;
}

/* Специальные акценты для разных карточек */
.listing-card__info-card--schedule::before {
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
}

.listing-card__info-card--category::before {
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
}

/* Тело карточки */
.listing-card__info-body {
  line-height: 1.6;
  color: #475569;
  font-size: 0.875rem;
}

.listing-card__info-body > div {
  margin-bottom: 0.4rem;
}

.listing-card__info-body > div:last-child {
  margin-bottom: 0;
}

/* Старые стили для секций в details */
.listing-card__section {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.listing-card__section h4 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  color: #0f172a;
}

.listing-card__form {
  display: grid;
  gap: 1rem;
}

.listing-card__field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
}

.listing-card__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 600;
  color: #1f2937;
}

.listing-card__input,
.listing-card__select {
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.listing-card__input:focus,
.listing-card__select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.listing-card__hint {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 400;
}

.listing-card__hint-box {
  background: #f1f5f9;
  border-radius: 10px;
  padding: 0.85rem;
  font-size: 0.85rem;
  color: #334155;
  display: grid;
  gap: 0.35rem;
}

.listing-card__hint-box--warning {
  background: #fff7ed;
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.listing-card__button {
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  text-align: center;
}

.listing-card__button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
}

.listing-card__button--primary {
  background: #2563eb;
  color: #fff;
}

.listing-card__button--success {
  background: #10b981;
  color: #fff;
}

.listing-card__button--accent {
  background: #3b82f6;
  color: #fff;
}

.listing-card__button--warning {
  background: #f59e0b;
  color: #fff;
}

.listing-card__button--secondary {
  background: #64748b;
  color: #fff;
}

.listing-card__button--secondary:hover {
  background: #475569;
}

.listing-card__button--muted {
  background: #475569;
  color: #fff;
}

.listing-card__button--danger {
  background: #ef4444;
  color: #fff;
}

.listing-card__action-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.listing-card__categories--empty {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}

.listing-card__alert {
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.listing-card__alert--neutral {
  background: #f1f5f9;
}

.listing-card__alert-title {
  font-weight: 700;
  margin-bottom: 0.35rem;
}

/* Панель кнопок действий */
.listing-card__actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin: 1rem 1.25rem 1.25rem;
  padding: 0.875rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.listing-card__details-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ===== Сетка карточек объявлений ===== */

.listings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Тулбар над сеткой */
.listings-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.listings-toolbar__filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.listings-toolbar__filter select {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid rgba(148, 163, 184, 0.15);
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  padding: 0.55rem 0.85rem;
  min-width: 180px;
}

.listings-toolbar__filter select:hover {
  border-color: rgba(59, 130, 246, 0.4);
}

.listings-toolbar__account-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #f8fafc;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s ease;
  padding: 0;
  position: relative;
}

.listings-toolbar__account-btn.is-visible {
  display: flex;
}

.listings-toolbar__account-btn:hover {
  background: #e2e8f0;
  border-color: rgba(59, 130, 246, 0.3);
}

/* Dropdown меню аккаунта */
.account-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  min-width: 200px;
  z-index: 100;
  padding: 0.35rem;
  display: none;
}

.account-dropdown.is-open {
  display: block;
}

.account-dropdown__item {
  display: block;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  border-radius: 8px;
  text-align: left;
  transition: background 0.15s ease;
}

.account-dropdown__item:hover {
  background: #f1f5f9;
}

.account-dropdown__item--danger {
  color: #dc2626;
}

.account-dropdown__item--danger:hover {
  background: #fef2f2;
}

.listings-toolbar__count {
  flex: 1;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.listings-toolbar__add-btn {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  background: #3b82f6;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.listings-toolbar__add-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Вертикальная карточка объявления */
.listing-card-v {
  position: relative;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-left: 3px solid transparent;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  animation: cardFadeIn 0.35s ease-out both;
}

.listing-card-v:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1), 0 4px 8px rgba(15, 23, 42, 0.04);
  border-color: rgba(148, 163, 184, 0.25);
}

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

/* Состояния — левый бордер */
.listing-card-v--active {
  border-left-color: #22c55e;
}

.listing-card-v--active:hover {
  border-color: rgba(34, 197, 94, 0.3);
}

.listing-card-v--pending {
  border-left-color: #f59e0b;
}

.listing-card-v--pending:hover {
  border-color: rgba(245, 158, 11, 0.3);
}

/* Фото */
.listing-card-v__photo {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: linear-gradient(145deg, #f1f5f9 0%, #e8edf4 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.listing-card-v__photo-overlays {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.listing-card-v__photo-overlays .listing-card-v__badge--position,
.listing-card-v__photo-overlays .listing-card-v__badge--bid {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 6px;
}

.listing-card-v__photo-overlays .listing-card-v__badge--position {
  background: rgba(59, 130, 246, 0.85);
  color: #ffffff;
}

.listing-card-v__photo-overlays .listing-card-v__badge--bid {
  background: rgba(139, 92, 246, 0.85);
  color: #ffffff;
}

.listing-card-v__photo-overlays .listing-card-v__badge--empty {
  background: rgba(100, 116, 139, 0.6);
  color: rgba(255, 255, 255, 0.7);
}

.listing-card-v__photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.listing-card-v__photo-placeholder {
  color: #cbd5e1;
  font-size: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  height: 100%;
}

.listing-card-v__delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  z-index: 2;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.listing-card-v:hover .listing-card-v__delete-btn {
  opacity: 1;
}

.listing-card-v__delete-btn:hover {
  background: rgba(220, 38, 38, 0.85);
}

.listing-card-v__photo-placeholder::after {
  content: 'Нет фото';
  font-size: 0.7rem;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

/* Контент карточки */
.listing-card-v__body {
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.listing-card-v__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  letter-spacing: -0.01em;
}

.listing-card-v__account {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Бейджи метрик */
.listing-card-v__badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.15rem;
}

.listing-card-v__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.listing-card-v__badge--active {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.listing-card-v__badge--inactive {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.listing-card-v__badge--pending {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.listing-card-v__badge--position {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
}

.listing-card-v__badge--bid {
  background: rgba(139, 92, 246, 0.1);
  color: #6d28d9;
}

.listing-card-v__badge--empty {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}

/* Панель действий */
.listing-card-v__actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.listing-card-v__main-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  letter-spacing: 0.01em;
}

.listing-card-v__main-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.listing-card-v__main-btn--start {
  background: #3b82f6;
  color: #ffffff;
}

.listing-card-v__main-btn--start:hover {
  background: #2563eb;
}

.listing-card-v__main-btn--stop {
  background: #475569;
  color: #ffffff;
}

.listing-card-v__main-btn--stop:hover {
  background: #334155;
}

.listing-card-v__main-btn--cancel {
  background: #f59e0b;
  color: #ffffff;
}

.listing-card-v__main-btn--cancel:hover {
  background: #d97706;
}

.listing-card-v__main-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Кнопка "..." */
.listing-card-v__menu-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: #f8fafc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
  position: relative;
}

.listing-card-v__menu-dots {
  font-size: 1.1rem;
  letter-spacing: 1px;
  line-height: 1;
}

.listing-card-v__menu-btn:hover {
  background: #e2e8f0;
  color: #475569;
  border-color: rgba(148, 163, 184, 0.3);
}

/* Dropdown меню карточки */
.card-dropdown {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
  min-width: 180px;
  z-index: 50;
  padding: 0.35rem;
  display: none;
}

.card-dropdown.is-open {
  display: block;
}

.card-dropdown__item {
  display: block;
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  border-radius: 7px;
  text-align: left;
  transition: background 0.15s ease;
}

.card-dropdown__item:hover {
  background: #f1f5f9;
}

.card-dropdown__item--danger {
  color: #dc2626;
}

.card-dropdown__item--danger:hover {
  background: #fef2f2;
}

/* Пустое состояние */
.listings-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #94a3b8;
  font-size: 0.95rem;
  grid-column: 1 / -1;
}

/* Адаптив сетки */
@media (max-width: 1100px) {
  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .listings-grid {
    grid-template-columns: 1fr;
  }

  .listings-toolbar {
    flex-wrap: wrap;
  }

  .listings-toolbar__filter {
    flex: 1 1 100%;
  }

  .listings-toolbar__filter select {
    flex: 1;
    min-width: 0;
  }

  .listings-toolbar__count {
    text-align: left;
  }

  .listing-card-v__body {
    padding: 0.85rem;
  }

  /* Bottom sheet на мобильном */
  .card-dropdown--mobile-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    border-radius: 16px 16px 0 0;
    min-width: unset;
    z-index: 1000;
    padding: 0.5rem 0.5rem 1.5rem;
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.2);
  }
}

/* ===== Конец стилей сетки ===== */

.listing-card__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.1);
  color: #0f172a;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.listing-card__close:hover {
  background: rgba(15, 23, 42, 0.2);
  transform: translateY(-1px);
}

.listing-card__content {
  display: grid;
  gap: 1rem;
}

.listing-modal-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(88, 28, 135, 0.4));
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.listing-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.listing-modal {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(148, 163, 184, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  outline: none;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.listing-modal-overlay.is-open .listing-modal {
  transform: scale(1);
}

/* Кастомный скроллбар */
.listing-modal::-webkit-scrollbar {
  width: 8px;
}

.listing-modal::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.1);
  border-radius: 10px;
}

.listing-modal::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 10px;
}

.listing-modal::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.listing-modal__body {
  display: grid;
  gap: 1rem;
}

.listing-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
  border: 1px solid rgba(239, 68, 68, 0.2);
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 1.25rem;
  cursor: pointer;
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.listing-modal__close:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
  transform: rotate(90deg) scale(1.05);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.listing-modal__header {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(148, 163, 184, 0.1);
  position: relative;
}

.listing-modal__header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
}

.listing-modal__image {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  border: 2px solid rgba(148, 163, 184, 0.15);
}

.listing-modal__image.is-empty {
  border: 2px dashed rgba(148, 163, 184, 0.3);
}

.listing-modal__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.listing-modal__image-placeholder {
  color: #94a3b8;
  font-weight: 600;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.2;
}

.listing-modal__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.listing-modal__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.listing-modal__subtitle {
  margin: 0;
  color: #64748b;
  font-size: 0.8rem;
  word-break: break-all;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-modal__section {
  margin-bottom: 1rem;
}

.listing-modal__label {
  display: block;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.listing-modal__form {
  display: grid;
  gap: 1rem;
}

.listing-modal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.listing-modal__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 600;
  color: #0f172a;
  font-size: 0.9rem;
}

.listing-modal__field--inline {
  gap: 0.5rem;
}

.listing-modal__range-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.listing-modal__range-value {
  font-weight: 700;
  color: #3b82f6;
  font-size: 1rem;
  min-width: 50px;
}

.listing-modal__days {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.listing-modal__day-button {
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  border: 1.5px solid rgba(148, 163, 184, 0.3);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.listing-modal__day-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.listing-modal__day-button:hover {
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.15);
}

.listing-modal__day-button.is-selected {
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.listing-modal__day-button.is-selected::before {
  opacity: 1;
}

.listing-modal__day-button span {
  position: relative;
  z-index: 1;
}

.listing-modal__hint {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.4rem;
  line-height: 1.4;
}

.listing-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid rgba(148, 163, 184, 0.1);
}

.listing-modal__save {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.7rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  position: relative;
  overflow: hidden;
}

.listing-modal__save::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.listing-modal__save:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.listing-modal__save:hover::before {
  opacity: 1;
}

.listing-modal__save:active {
  transform: translateY(0);
}

.listing-modal__save span {
  position: relative;
  z-index: 1;
}

.listing-modal__error {
  font-size: 0.8rem;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border-left: 3px solid #ef4444;
}

@media (max-width: 640px) {
  .listing-card__top {
    flex-direction: column;
  }

  .listing-card__photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: unset;
  }

  .listing-card__interval {
    width: 100%;
  }
  
  .listing-card__info-grid {
    grid-template-columns: 1fr;
    margin: 0.875rem 1rem 0;
    gap: 0.625rem;
  }
  
  .listing-card__info-card {
    padding: 0.875rem;
  }
  
  .listing-card__info-body {
    font-size: 0.8125rem;
  }
  
  /* Заголовок с фильтром на мобильных */
  .panel-header-with-filter {
    flex-direction: column;
    align-items: stretch;
    gap: 0.875rem;
    margin-bottom: 1rem;
    padding-bottom: 0.875rem;
  }
  
  .panel-header-with-filter h2 {
    margin-bottom: 0;
    font-size: 1.25rem;
  }
  
  .panel-header-with-filter::after {
    width: 60px;
  }
  
  #account-filter-select {
    width: 100%;
    min-width: unset;
    font-size: 0.9rem;
  }
  
  /* Модальное окно на мобильных */
  .listing-modal-overlay {
    padding: 0.5rem;
  }
  
  .listing-modal {
    max-width: 100%;
    padding: 1.25rem;
    max-height: 95vh;
  }
  
  .listing-modal__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .listing-modal__image {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }
  
  .listing-modal__title {
    font-size: 1rem;
  }
  
  .listing-modal__subtitle {
    font-size: 0.75rem;
  }
  
  .listing-modal__grid {
    grid-template-columns: 1fr;
  }
  
  .listing-modal__footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
  }
  
  /* Панель действий на мобильных */
  .listing-card__actions-bar {
    margin: 0.875rem 1rem 1rem;
    padding: 0.75rem;
    gap: 0.5rem;
  }
}

button.secondary:hover {
  background-color: #1e293b;
}

/* Навигация */
.navigation {
  background: linear-gradient(135deg, #7c2d12 0%, #b91c1c 40%, #c2410c 70%, #ea580c 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(124, 45, 18, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navigation__container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 56px;
}

.navigation__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.navigation__logo-image {
  height: 48px;
  width: auto;
  display: block;
}

.navigation__menu {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.navigation__link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.navigation__link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.navigation__link--active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-weight: 600;
}

.navigation__icon {
  font-size: 0.95rem;
  line-height: 1;
}

.navigation__text {
  line-height: 1;
}

.container--with-nav {
  padding-top: 2rem;
}

/* Приветственная страница */
.welcome-header {
  text-align: center;
  margin-bottom: 3rem;
}

.welcome-header h1 {
  font-size: 2.5rem;
  margin: 0 0 1rem;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.welcome-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.welcome-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

.welcome-card__icon {
  font-size: 3rem;
  line-height: 1;
}

.welcome-card__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
}

.welcome-card__description {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
  flex: 1;
}

.welcome-card__button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.welcome-card__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* Конкурентный анализ - сводка выбора */
.selection-summary {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 12px;
  border: 2px solid rgba(59, 130, 246, 0.2);
}

.selection-summary h3 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  color: #0f172a;
  font-weight: 700;
}

.selection-info {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.selection-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.selection-row:last-child {
  border-bottom: none;
}

.selection-label {
  font-weight: 600;
  color: #475569;
  min-width: 120px;
}

.selection-value {
  color: #0f172a;
  font-weight: 500;
  flex: 1;
}

/* Панель с кнопкой действия */
.panel-header-with-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.panel-header-with-actions h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.add-analysis-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.add-analysis-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.add-analysis-icon {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

/* Список анализов */
.analyses-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.analysis-item {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 1.25rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.analysis-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

.analysis-item__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.analysis-item__info {
  flex: 1;
  min-width: 0;
}

.analysis-item__title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.analysis-item__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

.analysis-item__status {
  font-size: 0.85rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
}

.analysis-item__status--running {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.analysis-item__status--completed {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}

.analysis-item__status--failed {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.analysis-item__details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.analysis-item__badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: #1e40af;
  font-size: 0.85rem;
  font-weight: 500;
}

.analysis-item__category {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 500;
}

.analysis-item__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.analysis-item__btn {
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.analysis-item__btn--primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.analysis-item__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.analysis-item__btn--danger {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.analysis-item__btn--danger:hover {
  background: rgba(239, 68, 68, 0.15);
  transform: translateY(-2px);
}

.analysis-item__btn--view {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.analysis-item__btn--view:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* Модальное окно результатов */
.results-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 2000;
}

.results-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.results-modal {
  background: #ffffff;
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.results-modal-overlay.is-open .results-modal {
  transform: scale(1);
}

.results-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.results-modal__close:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: rotate(90deg);
}

.results-modal__title {
  margin: 0 0 0.5rem 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
}

.results-modal__subtitle {
  margin: 0 0 1.5rem 0;
  color: #64748b;
  font-size: 1rem;
}

.results-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.results-table thead {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.results-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  color: #0f172a;
  border-bottom: 2px solid rgba(148, 163, 184, 0.2);
}

.results-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.results-table tbody tr:last-child td {
  border-bottom: none;
}

.results-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

.results-table__position {
  font-weight: 700;
  color: #3b82f6;
  font-size: 1.1rem;
  text-align: center;
  width: 80px;
}

.results-table__photo {
  width: 120px;
}

.results-table__photo img {
  width: 100px;
  height: 75px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.results-table__photo .no-photo {
  width: 100px;
  height: 75px;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
}

.results-table__title {
  color: #0f172a;
  font-weight: 500;
}

.results-table__bid {
  font-weight: 700;
  color: #10b981;
  font-size: 1.05rem;
  text-align: right;
  width: 120px;
}

.results-table__views {
  font-weight: 600;
  color: #64748b;
  text-align: right;
  width: 100px;
}

/* Мобильная адаптация навигации */
@media (max-width: 768px) {
  .navigation__container {
    height: auto;
    padding: 0.5rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .navigation__logo-image {
    height: 36px;
  }

  .navigation__menu {
    flex-wrap: wrap;
    gap: 0.2rem;
    justify-content: center;
    width: 100%;
  }

  .navigation__link {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
  }

  .navigation__icon {
    font-size: 0.85rem;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .page-header__controls {
    width: 100%;
  }

  .welcome-header h1 {
    font-size: 1.75rem;
  }

  .welcome-grid {
    grid-template-columns: 1fr;
  }
  
  .selection-row {
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
  }
  
  .selection-label {
    min-width: auto;
  }
  
  .panel-header-with-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .add-analysis-btn {
    width: 100%;
    justify-content: center;
  }
  
  .analysis-item__header {
    flex-direction: column;
    gap: 1rem;
  }
  
  .analysis-item__actions {
    width: 100%;
    flex-direction: column;
  }
  
  .analysis-item__btn {
    width: 100%;
    justify-content: center;
  }
  
  .results-modal {
    max-width: 100%;
    padding: 1.5rem;
    max-height: 95vh;
  }
  
  .results-modal__title {
    font-size: 1.5rem;
  }
  
  .results-table {
    font-size: 0.85rem;
  }
  
  .results-table th,
  .results-table td {
    padding: 0.75rem 0.5rem;
  }
  
  .results-table__photo {
    width: 80px;
  }
  
  .results-table__photo img,
  .results-table__photo .no-photo {
    width: 70px;
    height: 53px;
  }
  
  .results-table__position {
    width: 50px;
    font-size: 1rem;
  }
  
  .results-table__bid {
    width: 90px;
    font-size: 0.95rem;
  }
  
  .results-table__views {
    width: 80px;
    font-size: 0.9rem;
  }
}

/* Модальные окна */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal__content {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal__header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal__header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.modal__close {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal__close:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.modal__body {
  padding: 1.5rem;
}

.modal__footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.modal__btn {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.modal__btn--primary {
  background: #3b82f6;
  color: white;
}

.modal__btn--primary:hover {
  background: #2563eb;
}

.modal__btn--secondary {
  background: #f3f4f6;
  color: #374151;
}

.modal__btn--secondary:hover {
  background: #e5e7eb;
}

/* Кнопки расписания и истории в карточках анализа */
.analysis-item__btn--schedule {
  background: #8b5cf6;
  color: white;
}

.analysis-item__btn--schedule:hover {
  background: #7c3aed;
}

.analysis-item__btn--runs {
  background: #10b981;
  color: white;
}

.modal__content--large {
	max-width: 1200px;
}

/* История запусков */
.runs-history-container {
	display: flex;
	gap: 1.5rem;
	min-height: 500px;
}

.runs-dates-list {
	flex: 0 0 250px;
	border-right: 1px solid #e5e7eb;
	padding-right: 1.5rem;
}

.runs-dates-list__header {
	font-weight: 600;
	font-size: 0.9375rem;
	color: #374151;
	margin-bottom: 1rem;
}

.runs-dates-list__items {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.runs-date-item {
	width: 100%;
	padding: 0.875rem 1rem;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #ffffff;
	cursor: pointer;
	transition: all 0.2s;
	text-align: left;
}

.runs-date-item:hover {
	background: #f9fafb;
	border-color: #3b82f6;
}

.runs-date-item--selected {
	background: linear-gradient(135deg, #3b82f6, #8b5cf6);
	color: white;
	border-color: #3b82f6;
}

.runs-date-item--selected:hover {
	background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.runs-date-item__date {
	font-weight: 600;
	font-size: 0.9375rem;
	margin-bottom: 0.25rem;
}

.runs-date-item__count {
	font-size: 0.8125rem;
	opacity: 0.8;
}

.runs-content-area {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.runs-time-selector {
	margin-bottom: 1rem;
}

.runs-time-selector__label {
	font-weight: 600;
	font-size: 0.9375rem;
	color: #374151;
	margin-bottom: 0.75rem;
}

.runs-time-selector__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.runs-time-btn {
	padding: 0.625rem 1rem;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	background: #ffffff;
	color: #374151;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
}

.runs-time-btn:hover {
	background: #f9fafb;
	border-color: #3b82f6;
	color: #3b82f6;
}

.runs-time-btn--selected {
	background: linear-gradient(135deg, #3b82f6, #8b5cf6);
	color: white;
	border-color: #3b82f6;
}

.runs-time-btn--selected:hover {
	background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.runs-results-container {
	flex: 1;
}

/* Колонка изменения просмотров */
.results-table__views-diff {
	font-weight: 600;
	text-align: right;
	width: 140px;
}

.results-table__views-diff--positive {
	color: #10b981;
}

.results-table__views-diff--negative {
	color: #ef4444;
}

.results-table__views-diff--neutral {
	color: #64748b;
}

/* Мобильная адаптация истории запусков */
@media (max-width: 768px) {
	.runs-history-container {
		flex-direction: column;
		gap: 1rem;
	}
	
	.runs-dates-list {
		flex: none;
		border-right: none;
		border-bottom: 1px solid #e5e7eb;
		padding-right: 0;
		padding-bottom: 1rem;
	}
	
	.runs-dates-list__items {
		flex-direction: row;
		overflow-x: auto;
		gap: 0.5rem;
	}
	
	.runs-date-item {
		min-width: 140px;
		flex-shrink: 0;
	}
	
	.runs-time-selector__buttons {
		overflow-x: auto;
		flex-wrap: nowrap;
	}
	
	.runs-time-btn {
		flex-shrink: 0;
	}
	
	.results-table__views-diff {
		width: 100px;
		font-size: 0.9rem;
	}
}

/* Переключатель вида (Результаты / Статистика) */
.runs-view-toggle {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #e5e7eb;
}

.runs-view-toggle__btn {
	padding: 0.625rem 1.25rem;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	background: #ffffff;
	color: #374151;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
}

.runs-view-toggle__btn:hover {
	background: #f9fafb;
	border-color: #3b82f6;
	color: #3b82f6;
}

.runs-view-toggle__btn--active {
	background: linear-gradient(135deg, #3b82f6, #8b5cf6);
	color: white;
	border-color: #3b82f6;
}

.runs-view-toggle__btn--active:hover {
	background: linear-gradient(135deg, #2563eb, #7c3aed);
}

/* Управление сортировкой статистики */
.stats-table-controls {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
	padding: 1rem;
	background: #f9fafb;
	border-radius: 8px;
}

.stats-table-controls__label {
	font-weight: 600;
	font-size: 0.875rem;
	color: #374151;
}

.stats-sort-btn {
	padding: 0.5rem 1rem;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	background: #ffffff;
	color: #374151;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
}

.stats-sort-btn:hover {
	background: #f3f4f6;
	border-color: #3b82f6;
	color: #3b82f6;
}

.stats-sort-btn--active {
	background: #3b82f6;
	color: white;
	border-color: #3b82f6;
}

.stats-sort-btn--active:hover {
	background: #2563eb;
}

/* Таблица статистики */
.stats-table-row {
	cursor: pointer;
	transition: background-color 0.2s;
}

.stats-table-row:hover {
	background: rgba(59, 130, 246, 0.05);
}

.stats-status-badge {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	border-radius: 12px;
	font-size: 0.75rem;
	font-weight: 600;
}

.stats-status-badge--active {
	background: rgba(16, 185, 129, 0.1);
	color: #059669;
}

.stats-status-badge--inactive {
	background: rgba(239, 68, 68, 0.1);
	color: #dc2626;
}

/* Детали конкурента */
.competitor-details-summary {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin-bottom: 1.5rem;
	padding: 1.5rem;
	background: #f9fafb;
	border-radius: 8px;
}

.competitor-details-summary__item {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.competitor-details-summary__label {
	font-size: 0.875rem;
	color: #6b7280;
	font-weight: 500;
}

.competitor-details-summary__value {
	font-size: 1.125rem;
	font-weight: 700;
	color: #0f172a;
}

/* Мобильная адаптация статистики */
@media (max-width: 768px) {
	.runs-view-toggle {
		flex-direction: column;
		gap: 0.5rem;
	}
	
	.stats-table-controls {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}
	
	.stats-sort-btn {
		width: 100%;
	}
	
	.competitor-details-summary {
		grid-template-columns: 1fr;
	}
}

/* Список запусков */
.runs-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.run-item {
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.run-item:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.run-item__info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.run-item__date {
  font-weight: 600;
  color: #1f2937;
}

.run-item__count {
  font-size: 0.875rem;
  color: #6b7280;
}

.run-item__btn {
  padding: 0.5rem 1rem;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.run-item__btn:hover {
  background: #2563eb;
}

/* Поиск по нише */
.niche-checkbox-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 0.75rem;
}

.niche-checkbox-item {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.75rem;
	padding: 0.875rem 1rem;
	border: 1px solid rgba(148, 163, 184, 0.2);
	border-radius: 10px;
	background: #f8fafc;
	cursor: pointer;
	transition: all 0.2s ease;
	font-weight: 400;
}

.niche-checkbox-item:hover {
	border-color: rgba(59, 130, 246, 0.4);
	background: #f0f9ff;
}

.niche-checkbox-item:has(input:checked) {
	border-color: #3b82f6;
	background: linear-gradient(135deg, #eff6ff, #dbeafe);
	box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.niche-checkbox-item input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: #3b82f6;
	flex-shrink: 0;
}

.niche-checkbox-info {
	flex: 1;
	min-width: 0;
}

.niche-checkbox-name {
	font-weight: 600;
	color: #0f172a;
	font-size: 0.95rem;
	margin-bottom: 0.2rem;
}

.niche-checkbox-category {
	font-size: 0.8rem;
	color: #64748b;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.niche-category-cell {
	font-size: 0.85rem;
	color: #6b7280;
	max-width: 180px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media (max-width: 768px) {
	.niche-checkbox-list {
		grid-template-columns: 1fr;
	}
}

/* Бейджик расписания */
.analysis-item__schedule-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

/* Таблица статистики аккаунтов */
.stats-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stats-table thead {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stats-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #ffffff;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: none;
}

.stats-table__date {
  text-align: left;
  min-width: 120px;
}

.stats-table__number {
  text-align: right;
  min-width: 100px;
}

.stats-table tbody tr {
  background: #ffffff;
  transition: all 0.2s ease;
}

.stats-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.stats-table tbody tr:hover {
  background: #eff6ff;
  transform: scale(1.01);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.stats-table tbody td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
}

.stats-table tbody td:first-child {
  font-weight: 500;
  color: #0f172a;
}

.stats-table tbody td:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stats-table tbody tr:last-child td {
  border-bottom: 2px solid #cbd5e1;
}

/* Итоговая строка */
.stats-table tfoot {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  font-weight: 700;
}

.stats-table tfoot td {
  padding: 1rem;
  border-top: 3px solid #3b82f6;
  color: #0f172a;
  font-size: 1rem;
}

.stats-table tfoot td:first-child {
  color: #3b82f6;
  font-weight: 700;
}

.stats-table tfoot td:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Адаптивность для мобильных */
@media (max-width: 640px) {
  .stats-table {
    font-size: 0.85rem;
  }
  
  .stats-table th,
  .stats-table td {
    padding: 0.625rem 0.5rem;
  }
  
  .stats-table__number {
    min-width: 80px;
  }
}

/* Навигация по датам для статистики */
.date-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.date-navigation__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
}

.date-navigation__current {
  padding: 0 1.5rem;
}

.date-navigation__period {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.date-nav-btn {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.625rem 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.date-nav-btn:hover {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.date-nav-btn:active {
  transform: translateY(0);
}

.date-nav-btn--today {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border-color: #10b981;
  padding: 0.625rem 1.25rem;
}

.date-nav-btn--today:hover {
  background: linear-gradient(135deg, #059669, #047857);
  border-color: #059669;
  transform: translateY(-2px);
}

/* Разделители месяцев в таблице */
.stats-table__month-header {
  background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem !important;
  text-align: left !important;
}

.stats-table__week-separator {
  border-top: 3px solid #cbd5e1 !important;
}

/* Выходные дни */
.stats-table__weekend {
  background: linear-gradient(135deg, #fef2f2, #fee2e2) !important;
  border-left: 4px solid #ef4444 !important;
}

.stats-table__weekend:hover {
  background: linear-gradient(135deg, #fee2e2, #fecaca) !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2) !important;
}

.stats-table__weekend td:first-child {
  color: #dc2626 !important;
  font-weight: 600 !important;
}

/* Улучшенные стили для кнопки сбора статистики */
#collectButton:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

#collectButton:active {
  transform: translateY(0);
}

#collectButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  .date-navigation {
    flex-direction: column;
  }

  .date-navigation__controls {
    width: 100%;
  }

  .date-navigation__period {
    font-size: 1rem;
  }

  .date-nav-btn {
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    min-width: 40px;
  }
}

/* Анимация появления таблицы */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stats-table tbody {
  animation: fadeInUp 0.4s ease-out;
}

/* Улучшенный внешний вид итоговой строки */
.stats-table tfoot tr {
  position: relative;
}

.stats-table tfoot tr::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
}

/* Индикатор загрузки */
.loading-indicator {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  border-top-color: #3b82f6;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============ Виджет прогресса задач ============ */
#task-progress-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.task-progress-card {
  pointer-events: auto;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 280px;
  max-width: 380px;
  animation: taskProgressSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.3s ease;
}

.task-progress-card--done {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.task-progress-card--failed {
  border-color: rgba(239, 68, 68, 0.4);
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.task-progress-card--removing {
  animation: taskProgressSlideOut 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes taskProgressSlideIn {
  from {
    opacity: 0;
    transform: translateX(60px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes taskProgressSlideOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(60px) scale(0.9);
  }
}

.task-progress-circle {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.task-progress-circle svg {
  transform: rotate(-90deg);
  width: 52px;
  height: 52px;
}

.task-progress-circle__bg {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 4;
}

.task-progress-circle__fill {
  fill: none;
  stroke: #3b82f6;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
}

.task-progress-card--done .task-progress-circle__fill {
  stroke: #10b981;
}

.task-progress-card--failed .task-progress-circle__fill {
  stroke: #ef4444;
}

.task-progress-percent {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
}

.task-progress-card--done .task-progress-percent {
  color: #047857;
}

.task-progress-card--failed .task-progress-percent {
  color: #dc2626;
}

.task-progress-info {
  flex: 1;
  min-width: 0;
}

.task-progress-step {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-progress-card--done .task-progress-step {
  color: #047857;
}

.task-progress-card--failed .task-progress-step {
  color: #dc2626;
}

.task-progress-type {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.15rem;
}

@media (max-width: 640px) {
  #task-progress-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
  }

  .task-progress-card {
    min-width: unset;
    max-width: unset;
  }
}
