/* =========================================================
   BUTTONS
   ========================================================= */

.button {
  padding: 12px 16px;
  border: none;
  border-radius: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(79, 70, 229, 0.28);
}

.task-button {
  padding: 12px 16px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.task-button:hover {
  filter: brightness(1.05);
}

/* =========================================================
   SEARCH
   ========================================================= */

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(12px);
}

.search input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
}

.search input::placeholder {
  color: #7f8aa3;
}

/* =========================================================
   AVATAR
   ========================================================= */

.avatar {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;

  width: 56px;
  height: 56px;
  border-radius: 18px;

  display: grid;
  place-items: center;

  font-weight: 700;
  font-size: 18px;
  color: #fff;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-dot {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 12px;
  height: 12px;
  border: 2px solid #111827;
  border-radius: 50%;
  background: var(--success);
}

.avatar.a1 { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.avatar.a2 { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.avatar.a3 { background: linear-gradient(135deg, #059669, #10b981); }
.avatar.a4 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.avatar.a5 { background: linear-gradient(135deg, #0ea5e9, #6366f1); }

/* =========================================================
   BADGE
   ========================================================= */

.badge {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

/* =========================================================
   CHIP / FILTER
   ========================================================= */

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.chip.active {
  color: #fff;
  background: rgba(79, 70, 229, 0.25);
  border-color: rgba(99, 102, 241, 0.35);
}

/* =========================================================
   ICON BLOCKS
   ========================================================= */

.stats-title-icon {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.22);
}

.stats-title-icon svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

/* =========================================================
   DROPDOWN BUTTON
   ========================================================= */

.dropdown-arrow,
.autofunnel-arrow {
  width: 52px;
  height: 52px;
  flex-shrink: 0;

  display: grid;
  place-items: center;

  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;

  transition: transform 0.3s ease, background 0.2s ease, border-color 0.2s ease;
}

.dropdown-arrow:hover,
.autofunnel-arrow:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(99, 102, 241, 0.35);
}

.autofunnel-dropdown.open .autofunnel-arrow,
.stats-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

/* =========================================================
   PROGRESS
   ========================================================= */

.progress-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-scale {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  padding: 0 6px;
}

.progress-track {
  width: 100%;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #16a34a, #22c55e);
}

/* =========================================================
   LIVES
   ========================================================= */

.lives {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.life-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.18);
  color: #f87171;
}

.life-icon svg {
  width: 18px;
  height: 18px;
}

.life-icon.lost {
  opacity: 0.5;
}

/* =========================================================
   TASK BASE (ТОЛЬКО ВИЗУАЛ)
   ========================================================= */

.task-card {
  display: flex;
  gap: 18px;
}

.task-image {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 18px;
}

.task-text {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.6;
}